home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / mmailp.idb / usr / lib / Zmail / command.hlp.z / command.hlp
Encoding:
Text File  |  1997-01-22  |  142.3 KB  |  3,966 lines

  1. Z-mail deletes the files when the folder
  2. # command.hlp
  3. # Copyright 1990-94 Z-Code Software, a Division of NCD.
  4. # NOTE:
  5. #
  6. # This file should not contain TAB characters.
  7. # Use spaces for all formatting of text.
  8. #
  9. # The format of an entry in this file is:
  10. #
  11. # %index entry string%
  12. # %other key strings%
  13. # text of help entry, if any
  14. # %%<continuation entry
  15. # %%
  16. #
  17. # A "continuation entry" may be a "key string" for another entry in this
  18. # file or a string of the form "variable>key string" where the key string
  19. # is to be looked up in the file named by the indicated Z-Mail variable.
  20. #
  21. # If the index entry string begins with the character `-', that entry is
  22. # omitted from the index.
  23. #
  24. # NOTE: Some lines in this file consist of a single space on an otherwise
  25. # blank line.  This is intentional, and is used when reformatting entries
  26. # for display in the GUI and Lite Help Index.
  27.  
  28. %about%
  29. Information about information about information about the about the
  30. about command.  So there.
  31. %%
  32.  
  33. %?%
  34.       ? [command-name]
  35.  
  36. The "?" command provides a list of legal commands.  Most commands
  37. accept -? as an option.  This gives specialized help with that
  38. particular command.
  39.  
  40. If the optional command-name is given as an argument to "?", then help
  41. for that command is shown.
  42. %%
  43.  
  44. %Addressing%
  45. Addresses specify the recipients of your composed message. You enter
  46. addresses into the To, Cc, and Bcc fields. Each
  47. address that you specify in one of these fields receives one copy of
  48. your message.
  49.  
  50. The only difference between the three addressing fields is their
  51. presentation to the recipient:
  52.  
  53.   'To' addresses are to whom the message is directed.
  54.  
  55.   'Cc' addresses are 'Carbon copies.'
  56.  
  57.   'Bcc' addresses are 'Blind carbon copies.' Bcc addressees
  58.    receive a copy of the message, but do
  59.    not appear in the message's headers, so no
  60.    other recipients can tell that the Bcc recipient
  61.    got a copy.  
  62.  
  63. A mail recipient may be a user, an alias, a file, or a program.  Mail
  64. sent to a filename will simply be stored in the named file; mail sent
  65. to a program will cause that program to run with the message as its
  66. standard input.  
  67. Mail sent to an alias is sent to every recipient named
  68. in that alias.  
  69.  
  70. When more than one address is specified, the addresses given should be
  71. separated by commas.  The simplest addresses are just the login names
  72. of the local users you wish to send your message to:
  73.  
  74.     martha fred jerry jane
  75.  
  76. In these cases, Z-Mail can figure out that they are separate addresses
  77. and insert commas between them automatically:
  78.  
  79.     martha, fred, jerry, jane
  80.  
  81. More complex address lists must have the commas included in order for
  82. Z-Mail to read them correctly.
  83.  
  84. Addresses for users on machines other than your local machine may also
  85. contain `!', `@' and `%' characters which are used to separate the
  86. hostnames from the user name.
  87.  
  88. Domain addresses (also called Arpanet, Internet, RFC822, and "fully
  89. qualified" addresses) are specified as
  90.  
  91.     user@host.domain
  92.  
  93. where "domain" is usually a compound name such as "berkeley.edu" or
  94. "z-code.com".  This is the most common form of electronic addressing.
  95.  
  96. Another form of addressing describes the UUCP (UNIX-to-UNIX CoPy) path
  97. used to transmit a message:
  98.  
  99.     host1!host2!user
  100.  
  101. where there may be as many hosts as necessary to route the message to
  102. the recipient user.  In the example above, the "user" account is on
  103. "host2" and that machine is connected to "host1".  Your machine should
  104. have a UUCP connection to "host1" in this case.  UUCP addressing is
  105. becoming less common, but you may still see it occasionally.
  106.  
  107. UUCP and Domain addresses are sometimes mixed:
  108.  
  109.     host2!user@host1.domain
  110.  
  111. This tells the local system to transmit the message to host1 in the
  112. named domain, with the expectation that host1 will then UUCP the
  113. message to host2.  Delivery to "user" occurs on host2.
  114.  
  115. A `%' character has the same meaning as `@', but its interpretation is
  116. delayed until the message has crossed the uucp connection:
  117.  
  118.     host1!user%host2.domain
  119.  
  120. The above example tells the local system to UUCP the message to host1,
  121. with the expectation that host1 will transmit the message to host2 in
  122. the named domain.  Again, delivery to "user" occurs on host2.
  123.  
  124. Mixing of addresses in this way is discouraged, but it is sometimes
  125. required to assure delivery.  The complete syntax and ramifications of
  126. inter-network mailing are too complex to cover here.  More information
  127. can be obtained through your system manager.
  128.  
  129. If a recipient is a filename, it must be a full pathname beginning with
  130. slash (/), tilde (~) (meaning the user's home directory) or plus (+)
  131. (meaning the user's folder directory).
  132.  
  133. If a recipient is a program, is must begin with the pipe symbol
  134. (vertical bar, "|") and be enclosed in angle brackets:
  135.  
  136.     <|program arguments ...>
  137.  
  138. Note that because < and > have a special meaning to the mail system,
  139. programs to which mail is sent cannot use shell input and output
  140. redirection.  The arguments to a program also must not include comma
  141. (,) characters.  Commas are used by the mail system to separate one
  142. address from another.
  143. %%
  144.  
  145. %unignore%
  146. %%<ignore
  147.  
  148. %ignore%
  149.       ignore [header-labels]
  150.       unignore header-labels
  151.  
  152. When viewing a message, you can choose to "ignore" certain message
  153. headers that are uninteresting or that clutter up your mail-reading
  154. display.  Since message headers can be quite long, ignoring specific
  155. headers can make it easier to read messages.  It is not possible to
  156. give a complete listing of the headers that may appear in your
  157. messages, but some headers that are typically ignored are:
  158.  
  159.    Content-Length      Priority     Resent-Message-Id  Status
  160.    Content-Type        Received     Resent-To          Via
  161.    Encoding-Algorithm  Resent-Cc    Return-Path
  162.    Errors-To           Resent-Date  Return-Receipt-To
  163.    Message-Id          Resent-From  Sender
  164.    MIME-Version
  165.  
  166. Use the "ignore" command to set the message headers you would to be
  167. hidden when you read a message. If no header-label is given, a list of
  168. all headers currently being ignored is printed.
  169.  
  170. The "unignore" command removes headers from the list to be ignored.
  171. One or more header-labels are required as "unignore" arguments; it is
  172. an error to use it with no arguments.
  173.  
  174. You can use * as a wildcard operator in header names:
  175.  
  176.     ignore *          (ignores all headers)
  177.     ignore Received*  (ignores headers that start with "Received")
  178.     ignore Resent-*   (Resent-From, Resent-To, Resent-Date, ...)
  179.  
  180. You can set the variable ~#alwaysignore#~ to force normally ignored
  181. headers to be ignored even while saving messages, forwarding messages,
  182. or including messages into your compositions.
  183.  
  184. The list of ignored headers is itself ignored if there are "retain"
  185. headers set.
  186. %%
  187.  
  188. %unretain%
  189. %%<retain
  190.  
  191. %retain%
  192.       retain [header-labels]
  193.       unretain header-labels
  194.  
  195. When viewing a message, you can choose to view only certain message
  196. headers.  Since some message headers can be verbose and uninteresting
  197. to the casual user, specifying only those you wish to see can reduce
  198. the clutter in your mail-reading display and make it easier to read
  199. messages.
  200.  
  201. To specify the headers to be shown, use their names as the arguments
  202. to "retain".  It is not possible to give a complete listing of the
  203. headers that may appear in your messages, since you cannot predict
  204. what custom headers the sender may have included, but some of the
  205. headers you may wish to retain are:
  206.  
  207.       Bcc    Date    Name       Subject   X-Mailer
  208.       Cc     From    Reply-To   To
  209.  
  210. If no header is specified with "retain", a list of all headers
  211. currently being retained is printed.
  212.  
  213. The "unretain" command removes headers from the list to be shown.  One
  214. or more header names are required as "unretain" arguments.
  215.  
  216. See also the ~#ignore~cmd#~ command.
  217. %%
  218.  
  219. %unset%
  220. %%<set
  221.  
  222. %set%
  223.       set [?variable]
  224.       set variable [= value]
  225.       set variable += value
  226.       set variable -= value
  227.       unset variable
  228.  
  229. These commands set and clear temporary storage locations called
  230. ~#variables#~.  Some variables have special meanings to Z-Mail, and
  231. setting or unsetting them affects the way Z-Mail behaves.  Other
  232. variables may be used to store any textual information you might like
  233. to save.
  234.  
  235. For a list of all variables with special meanings, use:
  236.         ~#set~cmd#~ ?all
  237. For help on a particular one of these variables, use:
  238.         ~#set~cmd#~ ?variablename
  239.  
  240. With no parameters, ~#set~cmd#~ lists all variables and their values.
  241.  
  242. Some variables are called "boolean" variables, which means that they
  243. are interpreted as having a "true" (or "on") value when they are set,
  244. and a "false" (or "off") value when they are unset.  To set a boolean
  245. variable to "true", use:
  246.         ~#set~cmd#~ variable
  247. To set a boolean variable to "false", use:
  248.         ~#unset~cmd#~ variable
  249.  
  250. Other variables are called "multivalued" variables, which means that
  251. they are interpreted as a list of keywords, separated by spaces or
  252. commas.  There are also "string" valued variables and "numeric"
  253. variables.  A "string" is any set of characters, such as "abcd" or
  254. "Harper's Ferry."
  255.  
  256. To set a variable's value to a list of values, a string, or a number,
  257. use:
  258.  
  259.         ~#set~cmd#~ variable = value
  260.  
  261. where "value" is the list, string, or number you wish to store
  262. in the variable.  If you want spaces, tabs or double-quotes (")
  263. embedded in a value, surround the value with single quotes (').
  264. If you want single quotes in a value, surround it with double
  265. quotes.
  266.  
  267. The += and -= operators add or remove a value from the list stored in
  268. a multivalued variable.  You must include a space before and after -=
  269. or +=. To add a value, use:
  270.  
  271.         ~#set~cmd#~ variable += value
  272.  
  273. To remove a value:
  274.  
  275.         ~#set~cmd#~ variable -= value
  276.  
  277. When the last value is removed, the variable will become unset.
  278.  
  279. The -= operator may be used only on multivalued variables, but the +=
  280. operator may also be used on both multivalued and string-valued
  281. variables.  Using += on a string variable causes a string to be
  282. appended to the variable's value.  For example:
  283.  
  284.         ~#set~cmd#~ name = John       # $name is "John"
  285.         ~#set~cmd#~ name += son       # $name is "Johnson"
  286.  
  287. Note that the new string is appended directly to the existing value.
  288. To insert a space, use quotes:
  289.  
  290.         ~#set~cmd#~ name = John       # $name is "John"
  291.         ~#set~cmd#~ name += " Jones"  # $name is "John Jones"
  292.  
  293. The ~#unset~cmd#~ command removes a variable, changing its boolean value to
  294. "false" (or "off") and discarding any other value.
  295. %%
  296.  
  297. %display%
  298. %Display%
  299. %%<read_msg
  300.  
  301. %read%
  302. %Read%
  303. %%<read_msg
  304.  
  305. %print%
  306. %Print%
  307. %%<read_msg
  308.  
  309. %P%
  310. %p%
  311. %t%
  312. %T%
  313. %%<read_msg
  314.  
  315. %type%
  316. %Type%
  317. %%<read_msg
  318.  
  319. %top%
  320. %%<read_msg
  321.  
  322. %next%
  323. %n%
  324. %%<read_msg
  325.  
  326. %previous%
  327. %%<read_msg
  328.  
  329. %pinup%
  330. %Pinup%
  331. %%<read_msg
  332. %%
  333.  
  334. % -%
  335. %%<read_msg
  336. %%
  337.  
  338. %+%
  339. %%<read_msg
  340. %%
  341.  
  342. %-%
  343. %read_msg%
  344.       display  [msg-list]
  345.       pinup    [msg-list]
  346.       print    [msg-list]
  347.       p        [msg-list]
  348.       read     [msg-list]
  349.       type     [msg-list]
  350.       t        [msg-list]
  351.  
  352.       top      [msg-list]
  353.       next     [msg-list]
  354.       +        [msg-list]
  355.       previous [msg-list]
  356.       -        [msg-list]
  357.  
  358. You can read messages in different ways.  The command "type" displays
  359. the current message.  The commands "print", "read", and "display" are
  360. synonyms for "type".
  361. The command "top" displays only the first N
  362. lines of the current message where N is the value of the variable
  363. ~#toplines~var#~, or the variable ~#crt~var#~ if ~#toplines~var#~ is
  364. not set.  
  365. The command
  366. "next" advances to the next message in the folder which is neither
  367. deleted nor saved and displays that, and "previous" goes back to read
  368. the unread message preceding the current one.
  369.  
  370. The "+" and "-" commands are analagous to "next" and "previous"
  371. respectively, except that long messages are not passed through
  372. the default pager program for display.
  373.  
  374. Typing message list metacharacters as commands also displays messages.
  375. For example, "^" displays the first message, and "$" displays the
  376. last.
  377.  
  378. Any of these ~#commands#~ can be followed by a ~#message list#~, and the
  379. messages in that list will be displayed (they can also be piped to
  380. other commands).  The variations "Display", "Read", "Print", "P",
  381. "Type", and "T"  will display the complete set of message ~#headers#~ 
  382. (regardless of the ignored-headers list) unless overridden by the setting 
  383. of ~#alwaysignore~var#~.
  384.  
  385. These commands open the ~#Message Display window#~.  The "pinup"
  386. command displays the message in a "pinned up" copy of the ~#Message
  387. Display window#~.  A pinned up message remains visible until its
  388. folder is closed or updated or until the user dismisses the window.
  389. More than one message at a time can be displayed if each is pinned up.
  390. %%
  391.  
  392. %page%
  393.       page [-c charset] [file ...]
  394.  
  395. This command displays the contents of the files named by its
  396. arguments.  
  397. In character mode, page uses the pager specified by the
  398. variable ~#pager~var#~, the environment variable PAGER, or Z-Mail's
  399. internal pager if no other pager is specified.  In GUI mode, a
  400. scrolled window is opened to display each file. In Lite mode, only the
  401. last file in the list is displayed in a pager.
  402.  
  403. The -c option may be used to specify a MIME character set, if your
  404. system adminstrator has configured Z-Mail's app-defaults file to do
  405. so.
  406.  
  407. Piping a message list to page is equivalent to piping to ~#read~cmd#~.
  408. If no file names are given and no message list is piped, page does
  409. nothing.
  410. %%
  411.  
  412. %alternates%
  413. %alts%
  414.       alternates [host-list] [!path!login] [user@host] [*[user]]
  415. %%<-shared-alts
  416. %%
  417.  
  418. %-shared-alts%
  419. The ~#alternates~cmd#~ command tells Z-Mail that your login name at
  420. each of the listed hosts is really your login name.
  421.  
  422. When you reply to messages, Z-Mail does not send a copy of the message
  423. to your login name at any of the hosts listed on the alternates list.
  424. Hosts may be specified either as a single host name or as a UUCP
  425. path, using "!" characters to separate host names.
  426.  
  427. The symbol "*" in the ~#alternates~cmd#~ list matches your login name at any
  428. host.  For instance, if you are bobg@zyrcon.com, then "*" means "do
  429. not reply to bobg@andrew.cmu.edu or uunet!bobg or anyone else whose ID
  430. is bobg".  If the "*" is followed immediately by some name, then that
  431. name is used in place of your login ID.  If you have another login
  432. name on the local or remote host, then that login may be specified
  433. either as
  434.  
  435.     user@host
  436.  
  437. or by preceding the login name or a UUCP path to the login name by a
  438. "!" character, as
  439.  
  440.     !host!user
  441.  
  442. The leading "!" character tells Z-Mail that the path ends in a login
  443. name.  Without the "!", Z-Mail will append your login name.
  444.  
  445. The command "alts" is equivalent to "alternates".
  446.  
  447. Note that ~#alternates~cmd#~ commands are not cumulative.  Any argument
  448. given to an ~#alternates~cmd#~ command removes the current list and replaces
  449. it.  Reference the ~#alternates~var#~ variable to get the current list.
  450. %%
  451.  
  452. %saveopts%
  453. %%<source
  454. %%
  455.  
  456. %source%
  457.       source [file] [arguments ...]
  458.       saveopts [-A] [-a] [-f] [-g] [-o option] [file]
  459.  
  460. The "source" command loads, and the "saveopts" command saves, all
  461. variable settings, options, ~#aliases#~, user-defined ~#functions#~, command
  462. abbreviations, ignored ~#headers#~, etc.  The file to load from or save to
  463. is chosen according to these rules:
  464.  
  465.  1) If a filename is given, that file is used; otherwise,
  466.  2) If the environment variable ZMAILRC identifies the Z-Mail
  467.     configuration file, that file is used; otherwise,
  468.  3) The file ".zmailrc" in the user's home directory is used.
  469.  
  470. When source is used and other arguments appear after the file argument,
  471. those arguments become the "positional parameters" $1, $2, $3, etc., as
  472. if the file being sourced were a user-defined Z-Script ~#function~cmd#~.  See
  473. the ~#function~cmd#~ command for more details.
  474.  
  475. When saveopts is used, it saves only those values that have been changed
  476. since the system configuration file (system.zmailrc) was read.  If the
  477. -A argument is given, then all values are saved, including those read
  478. from the system configuration file.  (This was the behavior of the
  479. saveopts command prior to Z-Mail version 2.1.)
  480.  
  481. If saveopts is used and the target file exists, confirmation is
  482. requested before the file is overwritten.  The -f argument causes the
  483. file to be overwritten without confirmation.  The -a argument causes the
  484. configuration values to be appended to the file, also without
  485. confirmation.  In all cases, the file is created if it does not exist.
  486. The -g argument saves GUI-specific settings, such as fonts and
  487. colors, to a file.  In Z-Mail Lite, this option causes you to be 
  488. prompted for a separate file in which to save the keybindings you 
  489. have created with ~#bindkey~cmd#~ and ~#multikey~cmd#~. 
  490. Some variables' values are not saved because they hold transient
  491. information that may change from one Z-Mail session to the next:
  492.  
  493.  ~#cmd_help~var#~ - Help file location (may be set in system.zmailrc)
  494.  ~#gui_help~var#~ - Help file location (may be set in system.zmailrc)
  495.  ~#cwd~var#~ - Current directory (set at the start of a session)
  496.  ~#hostname~var#~ - Current host name
  497.  ~#home~var#~ - User's home directory
  498.  ~#user~var#~ - User's login name
  499.  
  500. The values of read-only variables are not saved.
  501.  
  502. The "option" argument following -o controls the configuration values
  503. which are saved. You can restrict the saved values to one of the
  504. following categories, named for the commands which create them:
  505.  
  506.  set - Variables
  507.  ~#my_hdr~cmd#~ - User-defined outgoing headers
  508.  alias - Mail ~#aliases#~
  509.  alts - Your alternate E-mail addresses
  510.  retain - Incoming headers to show
  511.  ignore - Incoming headers to hide
  512.  ~#cmd~cmd#~ - Command abbreviations
  513.  ~#filter~cmd#~ - Mail filters
  514.  ~#function~cmd#~ - User-defined functions
  515.  ~#button~cmd#~ - User-defined buttons 
  516.  ~#menu~cmd#~ - User-defined menus
  517.  ~#map~cmd#~ - Command-line mode key mappings
  518.  ~#map!~cmd#~ - Composition mode key mappings
  519.  
  520. More than one "-o option" may be used to save several categories.  For
  521. example:
  522.  
  523. saveopts -o function -o button my_buttons
  524.  
  525. The above saves all functions and buttons to the file "my_buttons".
  526.  
  527. Note that "alts" are normally saved via the ~#alternates~var#~ variable.
  528. Saving these as a separate option is provided for compatibility with
  529. older versions.
  530. %%
  531.  
  532. %sound%
  533.  sound [filename]
  534.  sound [-event type filename]
  535.  sound [-action type filename]
  536.  sound [-command type filename]
  537.  sound [-off [type] ]
  538.  
  539. WARNING:  This is an undocumented (sort of) and unsupported command in
  540. Z-Mail.  It is only for the real hacker types.  Sound only works if you
  541. have sound capabilities on your machine and the version of Z-Mail you
  542. have supports the sound command.
  543.  
  544. The sound command allows you to play sounds on your computer and
  545. possibly associate sounds with various different actions that can be
  546. taken by you or Z-Mail.
  547.  
  548. Note: all "filename" arguments are 8kHz sound samples only.
  549.  
  550.  sound filename  -- plays the sound in 
  551.                     the specified filename.
  552.  
  553.  -action type: Attach sounds with various zmail actions.
  554.    fatal   -- all fatal errors (zmail is about to crash!)
  555.    warning -- all warning dialogs
  556.    message -- any message dialog
  557.    query   -- any question dialog
  558.    newmail -- whenever new mail arrives
  559.               (Note:  The variable "quiet" must omit 
  560.                the value "newmail" in order for a 
  561.                sound to play with newmail.)
  562.  
  563.  -command type:
  564.    ANY command (including your own predefined functions)
  565.  
  566.    Example:
  567.      sound -c delete gurgle.aiff -- sound is played 
  568.                                     whenever "delete" 
  569.                                     is executed
  570.    NOTE: "-command" *also* works for UNIX commands
  571.  
  572.  -event type   Attach sounds to user-generated events 
  573.    in the GUI ANY "action" defined by the toolkit in use.  
  574.    For Motif, this requires knowledge of the internals 
  575.    of the Motif toolkit.  Note that these are are toolkit 
  576.    actions, not X "events" (despite the name of 
  577.    the -event flag).
  578.  
  579.  Examples:
  580.     sound -e arm soundname     -- a button is pressed
  581.     sound -e insert-text sound -- you insert text
  582.     sound -e ListKbdActivate sound
  583.                                -- you hit return in a list
  584.  
  585. There are literally hundreds of actions.  Note, these are NOT
  586. callback routines, but Xt (X Toolkit Intrinsics) based action
  587. functions that are specific to either the Motif or Open Look
  588. widget sets.  This option will probably be generalized to include
  589. a less-toolkit specific set of events.  Buy the Motif Programming
  590. Manual from O'Reilly & Associates (in fact, buy two just in case
  591. you lose one) for a complete list of action routines.
  592.  
  593.  -off type [type ...]
  594.    "type" would be any of those listed above.  You don't 
  595.    need to know whether the option was an event, action or 
  596.    command.  You can turn off any number of sounds in one 
  597.    command.
  598.  
  599. The "sound" command loads the sound from the file and holds the data
  600. internally, so changes to the file are ignored after a sound is
  601. loaded.  To play a sound, Z-Mail talks directly to the device.
  602. %%
  603.  
  604. %help%
  605.       help [-?] [item]
  606.  
  607. The "help" command displays help on a number of topics.  The format of
  608. a help entry varies depending on the topic.  Help for ~#commands~ui#~ usually
  609. begins as this entry does, with a usage summary of the command.  Words
  610. enclosed in square brackets [like this] represent optional arguments
  611. to the commands.  If a word in an argument begins with a "-"
  612. character, like "-?"  above, then it must be typed literally.  Other
  613. words, like the word "item" above, are meant only to DESIGNATE the
  614. appropriate argument.  You would never type "help item", for instance;
  615. you would replace "item" with whatever you wanted help on, as in "help
  616. variables" or "help path".
  617. %%<general
  618. %%
  619.  
  620. %-%
  621. %general%
  622. You can view help on various topics by typing "~#help~cmd#~ [item]" in the
  623. command area where [item] is one of these keywords:
  624.  
  625.     ~#addressing~ui#~    summary_fmt    msg-list
  626.     path          prompt        variables
  627.  
  628. You may also type "help [command]" or "? [command]" to get help on the
  629. particular command that you specify.  Type "?" to get a list of
  630. available commands.
  631.  
  632. You can also get help for most commands by typing the command name with
  633. the argument "-?".
  634.  
  635. Use "~#set~cmd#~ ?variable" to get help with specific variables.
  636. %%
  637.  
  638. %-%
  639. %path%
  640. Whenever a filename, or "pathname," is specified, the following syntax
  641. is legal in addition to the normal path syntax:
  642.  
  643.  ~         -- your home directory
  644.  ~user     -- the home directory of the named user
  645.  %         -- your system mailbox
  646.               (usually /usr/spool/mail/<your-name>)
  647.  %user     -- the system mailbox of the named user
  648.  +         -- your folder directory, indicated by the
  649.               ~#folder~var#~ variable,
  650.                or ~/Mail
  651.  +file     -- the named file in your ~#folder~var#~ directory
  652.  +/file    -- synonym for +file
  653. %%
  654.  
  655. %-%
  656. %Message Lists%
  657. %msg-list%
  658. A "message list" refers to one or more messages.  The user specifies a
  659. group of messages by their numbers, according to a special syntax.
  660. %%<-shared-message-lists
  661.  
  662. %-shared-message-lists%
  663.  *      All messages in the current folder.
  664.  ^      The first message in the current folder.
  665.  $      The last message in the current folder.
  666.  .      The current message.
  667.  N-M    A range of messages between N and M, inclusive.
  668.  
  669. In the last case, N and M may be "*", "^", "$", ".", or numbers
  670. identifying specific messages.  The range must be in ascending order
  671. (i.e., you may use the range "3-7," but not "7-3").
  672.  
  673. You can exclude messages from a list by placing a message list
  674. inside braces ("{" and "}").  Thus the message list "2-19 {11-14}"
  675. refers to messages 2 through 19 EXCEPT FOR those from 11 through 14.
  676. The "exclusion", or list within braces, must be preceded by a normal
  677. message list from which the latter numbers can be excluded.
  678.  
  679. When an operation using a message list is executed, the messages in
  680. the list are always processed in numerical order regardless of the
  681. order in which the messages were specified.  In particular, the
  682. ~#save~cmd#~ operation applied to the message list
  683.  
  684.     5,2,7
  685.  
  686. will cause messages 2, 5, and 7 to be saved in that order (not in the
  687. 5, 2, 7 order).
  688. %%
  689.  
  690. %-%
  691. %Header Format%
  692. %summary_fmt%
  693. The ~#summary_fmt~var#~ variable controls the display of message
  694. headers.  ("~#Headers~ui#~" in this context refers to the message
  695. summaries listed by the "~#headers~cmd#~" command.  In other contexts,
  696. the word "headers" refers to the separate fields in the beginning of
  697. mail messages, such as "To:", "Subject:", "Cc:", and so on.)  Use:
  698.  
  699.       ~#set~cmd#~ ~#summary_fmt~var#~="string"
  700.  
  701. to change the header display.  The string can contain the following
  702. special format characters, which will be replaced as described:
  703.  
  704.     %a  address of the author
  705.     %c  number of characters (bytes) in the message
  706.     %d  entire date of the message
  707.         (see ~#date_received~var#~ variable)
  708.     %f  "From" header (author name and address)
  709.     %i  message-id (may or may not be present)
  710.     %l  number of lines in the message
  711.     %M  month name from the message date
  712.     %m  month number from the message date
  713.     %N  day of the month (number)
  714.     %n  name of the author
  715.     %s  subject of the message
  716.     %t  "To" header (recipients of the message)
  717.     %T  time of the message
  718.         (see ~#mil_time~var#~ variable)
  719.     %u  user (login) name of the author
  720.     %W  day of the week (Sun, Mon, etc.)
  721.     %Y  year of the message 
  722.     %y  year (last 2 digits only)
  723.     %Z  the time-zone (as sent by the author)
  724.     \n  a newline
  725.     \t  a tab
  726.  
  727. A header width may be specified in any conversion.  Thus, "%20s"
  728. displays the first 20 characters of the Subject.
  729.  
  730. Two special conversions may also be used:
  731.  
  732. %?header? (body of specified header)
  733.     The header whose name is given between the question
  734.     marks is searched for.  If it is found, its content is
  735.     displayed.  Thus, "%?Return-Path?" may expand to the
  736.     text associated with the "Return-Path" header sent by
  737.     the sender of the message.
  738.  
  739. %{format} (reformatted substring)
  740.     The substring specified by format is generated according
  741.     to the conversion rules given above.  Any field width
  742.     (given between the "%" and the opening "{") is then
  743.     applied to the substring.  Thus, "%8{%m/%N/%y}" displays
  744.     month/day/year in an 8-character-wide field.  The %{...}
  745.     may be nested.
  746. %%
  747.  
  748. %-%
  749. %prompt%
  750. This variable controls the prompt that zmail displays.
  751.  
  752.         ~#set~cmd#~ ~#prompt~var#~ = "string"
  753.  
  754. The following characters may be embedded in the string, and will be
  755. replaced as described.
  756.  
  757.     %F  full path of the current working folder
  758.     %f  name (path tail) of the current folder
  759.     %m  current message number
  760.     %n  number of new messages
  761.     %u  number of unread messages
  762.     %d  number of deleted messages
  763.     %t  total number of messages
  764.     %T  current time
  765.     %N  day of the month (number) (today)
  766.     %W  weekday name (today)
  767.     %M  month name (this month)
  768.     %Y  year (this year)
  769.     %y  year (last 2 digits only)
  770.     %$  introduces variable name 
  771.     \n  newline
  772.     \t  tab
  773.  
  774. The special sequence %$ must be followed by the name of a variable.
  775. The value of that variable is inserted into the prompt at the time the
  776. prompt is displayed.  When setting a %$variable sequence in your
  777. prompt, be sure to enclose the string in single quotes ('') to prevent
  778. the shell from expanding the variable at that time.
  779. %%
  780.  
  781. %unpreserve%
  782. %unpre%
  783. %%<preserve
  784.  
  785. %preserve%
  786. %pre%
  787.       preserve [msg-list]
  788.       unpreserve [msg-list]
  789.  
  790. The "preserve" command marks messages to be held in your system
  791. mailbox.  Unless explicitly preserved, all mail that you read is saved
  792. in your main mailbox (
  793. ~/mbox or 
  794. the file specified by the ~#mbox~var#~
  795. variable) when your system folder is updated.  The "preserve" command
  796. does not undelete ~#delete#~d messages.  Deleted messages can only be
  797. preserved if they are also explicitly ~#undelete#~d.
  798.  
  799. When a message is preserved, the "P" status flag appears in the header
  800. summary display for that message.
  801.  
  802. The "unpreserve" command reverses the effect of "preserve".
  803.  
  804. Setting the boolean variable ~#hold~var#~ is equivalent to
  805. preserving each message as you read it, except that no "P" status
  806. flag is set.  Instead, all messages will remain in the system mailbox
  807. unless they are deleted or saved elsewhere.
  808. %%
  809.  
  810. %unmark%
  811. %%<mark
  812.  
  813. %mark%
  814.       mark [-[A|B|C|D|E]] [msg-list]
  815.       unmark [msg-list]
  816.  
  817. The "mark" command places a tag on messages that you wish to reference
  818. later.  If no argument or a msg-list only is given, the mark is
  819. temporary and is not be saved when the folder is closed or updated.
  820. The command "~#headers~cmd#~ -H:m" (abbreviated as ":m") can be used to
  821. reference all messages having this temporary mark.
  822.  
  823. A specific "priority" may be assigned to messages by using one of the
  824. options "-A" through "-E".  The ~#sort~cmd#~ and ~#pick~cmd#~ commands can be used
  825. to order or select messages according to their priorities.  Message
  826. priorities, unlike ordinary marks, are saved across folder updates.
  827.  
  828. Messages may have both a temporary mark and a priority, but may not
  829. have more than one priority.  The presence of a temporary mark is
  830. shown by a "+" character to the left of the the message status in the
  831. "headers" command display.  The priority letter is shown in the same
  832. place if the message is unmarked but prioritized.
  833.  
  834. The "unmark" command removes temporary marks only.  To remove the
  835. priority of a message, use a "-" but do not specify a priority:
  836.  
  837.     mark - [msg-list]
  838.  
  839. See also the commands ~#set~cmd#~, ~#sort~cmd#~, ~#pick~cmd#~, and ~#headers~cmd#~.
  840. %%
  841.  
  842. %priority%
  843.       priority [name=value ...] 
  844.  
  845. The "priority" command gives a name to a certain priority level.
  846. The "name" will be assigned to the given "value", which must be a
  847. number from 1 to 30 (lower numbers are higher priority).
  848. %%
  849.  
  850. %write%
  851. %w%
  852. %%<save
  853.  
  854. %copy%
  855. %co%
  856. %%<save
  857.  
  858. %save%
  859. %s%
  860.       save [-s|-S|-a|-A] [-f] -prune <cutoff> [msg-list] [filename]
  861.       copy [-s|-S|-a|-A] [-f] -prune <cutoff> [msg-list] [filename]
  862.       write [-s|-S|-a|-A] [-f] -prune <cutoff> [msg-list] [filename]
  863.  
  864. Each of these commands places one or more messages in a folder or a
  865. file.  If no arguments are specified, the current message
  866. is saved to ~/mbox.
  867.  
  868. "Save" saves the entire message, including ~#headers~ui#~.  The saved message
  869. is flagged as having been "saved."  Unless the variable
  870. ~#keepsave~var#~ is turned on, messages flagged as "saved" are deleted
  871. from the system mailbox when it is next closed or updated.  Also see
  872. the description of the variable ~#deletesave~var#~.
  873.  
  874. ~#Copy~var#~ works just like "save" but does not flag the copied message(s)
  875. with the S (saved) flag.
  876.  
  877. "Write" saves only the message body and none of the headers.  Because
  878. messages contained in message folders MUST contain headers, "write"
  879. cannot be used to store messages in folders.  "Write" should only be
  880. used to store messages in ordinary files.  "Write" does not flag the
  881. message(s) as "saved."
  882.  
  883. When a message is flagged as having been saved, the letter "S" appears
  884. in its message summary line.
  885.  
  886. Each command accepts the same arguments.  If no filename is specified,
  887. the user's main mailbox
  888. (~/mbox or
  889. the value of the variable ~#mbox~var#~)
  890. is used.
  891. The "-f" option forces the command to overwrite the target file or
  892. folder.  If "-f" is not used, then the messages are appended to the
  893. target file's existing contents, if any.
  894.  
  895. The "-s" and "-S" options cause the target filename to be chosen
  896. automatically according to the "Subject:" of the message(s) to be
  897. saved.  In this case, the filename argument must either be omitted or
  898. must name a directory in which a new file can be created (in which
  899. case, that directory will be where the chosen filenames are placed).
  900. If more than one message is to be saved, then each message having a
  901. different "Subject:" will go into a different file.  However, "-S"
  902. causes the entire message list to be placed in one file, named by the
  903. "Subject:" of the first message in the list.
  904.  
  905. The "-a" and "-A" options work like "-s" and "-S" except that the
  906. filename is chosen according to the name of the message author rather
  907. than according to the "Subject:" line.
  908.  
  909. The -prune option removes large attachments from the message before
  910. saving.  Attachments larger than the given cutoff size, in bytes, will
  911. be removed from the saved message.
  912. See also the variable ~#attach_prune_size~var#~, which sets the cutoff
  913. when the Save dialog is used.
  914.  
  915. When filenames are generated from the subject or author name, blanks
  916. and slashes (/) are converted to underscores (_).  A leading Re: in
  917. the subject of a response is stripped, so a reply is saved in the same
  918. folder as the original message (provided the subject hasn't changed).
  919.  
  920. See also the variable ~#keepsave~var#~, which prevents the "saved" status
  921. from causing messages to be deleted.
  922. %%
  923.  
  924. %lpr%
  925.       lpr [-a] [-c 'command'] [-n] [-h] [msg-list]
  926.  
  927. Send a message to the printer.  The options are:
  928.   -a      print all message headers
  929.   -c'command'
  930.           run 'command' instead of $print_cmd
  931.   -n      print body of message only (no headers)
  932.   -h      do not print ignored headers
  933.   -s      use a single print command to print all messages
  934.   -Pxx    print on printer xx
  935.  
  936. This command invokes one of the "lpr" or the "lp" programs, depending
  937. on your operating system, and supplies the message to be printed as
  938. the standard input of that program.
  939.  
  940. The variable ~#printer~var#~ can be used to specify a default printer; for
  941. example, "set printer=laser" is the same as always using "-Plaser".
  942. The variable ~#printer_opt~var#~ specifies the command-line option used to
  943. pass the printer name to "lpr" or "lp" (the default is "-P" for "lpr"
  944. or "-d" for "lp").
  945.  
  946. The variable ~#print_cmd~var#~ can be used to specify a program other than
  947. lpr or lp to use for printing.  If ~#print_cmd~var#~ is specified, then
  948. '%P' in the value is replaced by the printer name, and '%O' is replaced by
  949. both the option and printer name (e.g. "-Plaser").  If neither %P nor
  950. %O appears, the printer name and option are not used.
  951.  
  952. See also the variable ~#alwaysignore~var#~.
  953. %%
  954.  
  955. %mail%
  956. %m%
  957.       mail [mail-options] [recipients]
  958.  
  959. Compose and send a mail message.  The possible mail-options follow.
  960. Note that a trailing "!" on some options negates the meaning of that
  961. option.
  962.  
  963.   -A [type:]file  attach file, treating file as the named type
  964.   -b bcc-addrs    set blind-carbon-copy recipients
  965.   -C comment      place comment in X-Remarks: header
  966.   -c cc-addrs     set carbon-copy recipients
  967.   -E[!]           [do not] place outgoing headers in the editor
  968.   -e[!]           [do not] immediately enter editor (autoedit)
  969.   -F[!]           [do not] add fortune to the end of message
  970.   -f [msg-list]   forward listed messages, unindented
  971.   -H file         read file as prepared text (no headers)
  972.   -h file         read file as prepared draft (with headers)
  973.   -I [msg-list]   include msg-list with headers in letter
  974.   -i [msg-list]   include msg-list in letter (no headers)
  975.   -l[!]           [do not] record message
  976.   -L[!]           [do not] log message header
  977.   -M [msg-list]   forward listed messages, as attachments
  978.   -p template     search for and read prepared template
  979.   -Q file         read file as message body and send
  980.                   immediately to transport agent.
  981.   -q[!] [msg-num] send message referenced by msg-num to 
  982.                   transport agent. "-q" accepts one message
  983.                   number only. If you do not specify a 
  984.                   message number, "mail" uses the current
  985.                   message number. "!" indicates not to send
  986.                   the message to the transport agent.
  987.   -s [subject]    prompt for or set subject
  988.   -u              do not append signatures and fortunes
  989.   -U              send draft immediately (use with -h or -H or -A)
  990.   -v              verbose (not available on some systems)
  991.  
  992. The "-I" and "-i" options read the indicated messages into the text of
  993. your letter, surrounded by the text of variables ~#pre_indent_str~var#~,
  994. ~#indent_str~var#~, and ~#post_indent_str~var#~.
  995.  
  996. The "-f" option forwards the indicated messages.  If the "-U" option is
  997. also given, new headers beginning with "Resent-" are merged into the
  998. existing headers of each message, and each message is sent separately.
  999. Otherwise, "-f" copies the text of all messages into the text of your
  1000. letter, preceding each with "--- Forwarded mail from <sender>", and
  1001. following each with "--- End of forwarded mail from <sender>".
  1002.  
  1003. The "-M" option forwards the indicated messages as attachments, without
  1004. modification.
  1005.  
  1006. The "-h" option reads a draft file, which should already include
  1007. message headers.  The "-H" option reads a text file, which should NOT
  1008. include headers.  If the "-U" option is also given, the draft is sent
  1009. immediately.  The "-A" option is like "-H", except that the named file
  1010. is appended to the message as an attachment, so binary files may also
  1011. be sent.
  1012.  
  1013. The "-p" option is like "-h" except that the directories named in the
  1014. ~#templates~var#~ variable are searched for the file to read.  If
  1015. a template named "default" exists in the ~#templates~var#~ path, Z-Mail
  1016. always loads that file when beginning a composition.  Note that the
  1017. ~#templates#~ variable must be set in order for the "default" template to
  1018. be used, even if the "default" template is stored in the system
  1019. templates directory 
  1020. (usually $ZMLIB/forms).
  1021.  
  1022. In GUI and Lite modes, the "mail" command opens the Compose Window,
  1023. filling in the "To:" line and other headers as appropriate.
  1024.  
  1025. See also the ~#reply~cmd#~ command and the following variables:
  1026.  
  1027.     ~#ask~var#~             ~#askcc~var#~           ~#autoedit~var#~
  1028.     ~#autoinclude~var#~     ~#autosign~var#~        ~#autosign2~var#~
  1029.     ~#dot~var#~             ~#edit_hdrs~var#~       ~#escape~var#~
  1030.     ~#fortune~var#~         ~#fortunates~var#~      ~#logfile~var#~
  1031.     ~#record~var#~          ~#no_expand~var#~       ~#no_hdrs~var#~
  1032.     ~#realname~var#~        ~#sendmail~var#~        ~#templates~var#~
  1033.     ~#verbose~var#~         ~#verify~var#~          ~#wrapcolumn~var#~
  1034. %%
  1035.  
  1036. %replyall%
  1037. %R%
  1038. %%<reply
  1039.  
  1040. %reply%
  1041. %r%
  1042. %replysender%
  1043. %respond%
  1044.       reply [msg-list] [-r path] [mail-flags] [recipients]
  1045.       r  [msg-list] [-r path] [mail-flags] [recipients]
  1046.       replyall [msg-list] [-r path] [mail-flags] [recipients]
  1047.       R  [msg-list] [-r path] [mail-flags] [recipients]
  1048.  
  1049. These commands permit you to compose a reply to the sender and/or
  1050. recipients of the current message (or of the messages named in
  1051. msg-list).
  1052.  
  1053. The command "replysender" is identical to "reply".  The "reply",
  1054. "replysender", and "r"  commands reply only to the sender of a message.  
  1055. The commands "replyall" and "R" respond to everyone on the To: and Cc: 
  1056. lines of the message, in addition to the sender.
  1057.  
  1058. If a message list is indicated, then each message on the list is
  1059. replied to in the same manner.  If "-r" is specified with a host or a
  1060. uucp-style path, then each address in the list is routed via this
  1061. path.  This overrides the value of the variable ~#auto_route~var#~.  See
  1062. help on ~#Addressing~ui#~ for more information on uucp-style paths.
  1063.  
  1064. When you reply to the sender of a message, the address is computed by
  1065. looking at certain ~#headers#~ in the original message.  By default, these
  1066. ~#headers#~ are "Reply-To:", "From:", and "Return-Path:".  You may
  1067. override this by setting the variable ~#reply_to_hdr~var#~.  The headers
  1068. listed in this variable are searched in order until one is found in
  1069. the message being replied to.  If none of the ~#headers#~ in the list is
  1070. found, the default ~#headers#~ (mentioned above) are searched.
  1071.  
  1072. See the command ~#mail~cmd#~ for a complete list of other options.
  1073.  
  1074. In GUI and Lite modes, the ~#reply~cmd#~ command opens the ~#Compose Window#~,
  1075. with ~#headers#~ properly initialized.
  1076.  
  1077. See also the following variables:
  1078.  
  1079.     ~#auto_route~var#~     ~#domain_route~var#~    ~#in_reply_to~var#~
  1080.     ~#known_hosts~var#~    ~#metoo~var#~           ~#reply_to_hdr~var#~
  1081.  
  1082. plus those variables listed in the help for ~#mail~cmd#~.
  1083. %%
  1084.  
  1085. %sort%
  1086.       sort [-i] [-r] [-a|-d|-l|-p|-R|-s|-S]
  1087.  
  1088. Sorts the messages within the current folder.  Sort options are:
  1089.  
  1090.   -i         ignore case in alphabetical sorts
  1091.   -r         reverse order of next sort-type
  1092.  
  1093.   -a         by author (alphabetical)
  1094.   -d         according to date
  1095.   -l         by message length (size)
  1096.   -p         by priority (A-E)
  1097.   -R         by subject including Re:
  1098.   -s         by subject ignoring Re:
  1099.   -S         by status
  1100.  
  1101. The options "-a", "-d", "-l", "-p", "-R", "-s", and "-S" are called
  1102. "sort-types" and instruct Z-Mail what type of sort to perform.
  1103.  
  1104. Any combination of the options can be given.  Sort-types specified
  1105. earlier in the command line take precedence over those specified
  1106. later.  For example,
  1107.  
  1108.     sort -a -d
  1109.  
  1110. sorts by author, and among those messages from the same author, sorts
  1111. by date.  On the other hand,
  1112.  
  1113.     sort -d -a
  1114.  
  1115. sorts all the messages by date, and among messages having the same
  1116. date, sorts by author.
  1117.  
  1118. The "-r" flag reverses the order of the next sort-type specified on
  1119. the command line.  Example:
  1120.  
  1121.       sort -a -r -d
  1122.  
  1123. The above sorts by author first, ignoring case, and within groups of
  1124. messages by the same author, "reverse-sorts" by date (i.e., later
  1125. dates will come BEFORE earlier dates).  The "-r" option only affects
  1126. the sort-type immediately following it on the command line.  To
  1127. reverse-sort by author AND reverse-sort by date, you would need to
  1128. type:
  1129.  
  1130.     sort -r -a -r -d
  1131.  
  1132. (one "-r" for each sort-reversal).  Note that two "-r"'s in succession
  1133. do NOT cancel each other out!
  1134.  
  1135. The "-i" applies to all sort-types on the line, unlike the "-r"
  1136. option.  If "-i" is present, then all alphabetic sort-types requested
  1137. ignore case.
  1138.  
  1139. If no arguments are given, sort orders messages by their status.  New,
  1140. unread messages come first, followed by preserved messages, and
  1141. finally the deleted messages.  If "-r" is the only flag given, the
  1142. status order is reversed.
  1143.  
  1144. If the variable ~#date_received~var#~ is set, sorting by date is done using
  1145. the date you received the message.  Otherwise, sorting by date uses
  1146. the date that the message was sent by the original author.
  1147.  
  1148. See also the variable ~#sort~var#~ for automatic sorting on startup.
  1149. %%
  1150.  
  1151. %search%
  1152. %%<pick
  1153.  
  1154. %pick%
  1155.       pick [options] <pattern>
  1156.  
  1157. Search for patterns within messages.  "Search" is a synonym for
  1158. "pick".  "Pick" searches entire messages for <pattern> unless
  1159. otherwise specified.  Only one of "-d" or "-ago" can be specified.  
  1160. "-f", "-h", "-s", and "-t" can be used in combination, but
  1161. cannot be repeated.  No pattern is used with "-d" and "-ago".
  1162.   
  1163. The "-x" option may not be used in conjunction with +<num> or -<num>.
  1164.    
  1165. Options are:
  1166.   
  1167.  +<num>        return only the first <num>ber of the messages matched
  1168.   
  1169.  -<num>        return only the last <num>ber of the messages matched
  1170.   
  1171.  -ago <time>   select messages sent <time> amount of time ago
  1172.                relative to today's date.
  1173.   
  1174.                <Time> is a number followed by the word 
  1175.                "days" and/or a number followed by the 
  1176.                word "weeks" and/or a number followed by 
  1177.                the word "months" and/or a number followed 
  1178.                by the word "years".
  1179.   
  1180.                The words may be abbreviated as "d", "w", "m",
  1181.                and "y".  The numbers may be negated to select
  1182.                messages sent before (rather than since) 
  1183.                <time> amount of time ago.  
  1184.   
  1185.                Examples:
  1186.   
  1187.                  pick -ago 2Weeks1Day   messages younger than 
  1188.                                         15 days
  1189.   
  1190.                  pick -ago 1d2w         same as above
  1191.                  pick -ago 15days
  1192.   
  1193.                  pick -ago -3w          messages OLDER than 
  1194.                                         3 weeks
  1195.   
  1196.  -B            match pattern in the message body only
  1197.   
  1198.  -b date1 date2  
  1199.                select messages between dates (see "-d" above
  1200.                for format). You may alternatively specify two 
  1201.                "-d" arguments.
  1202.   
  1203.  -X            use an extended regular expression syntax for 
  1204.                patterns.
  1205.   
  1206.  -d <date>     select messages sent on, before, or after <date>.  
  1207.   
  1208.                A date has the form:  [+-][month]/[date[/year]] 
  1209.                         
  1210.                A leading "+" means select messages sent ON or AFTER 
  1211.                the date.  A leading "-" means select messages sent ON 
  1212.                or BEFORE the date.  Omitted fields default to today's 
  1213.                values.  
  1214.                       
  1215.                   Examples: 
  1216.   
  1217.                   pick -d 4/20     on Apr 20, this year 
  1218.   
  1219.                   pick -d -/2/85   on or before the 2nd, this month, 1985 
  1220.   
  1221.                   pick -d +5/4     on or after May 4, this year 
  1222.   
  1223.                   pick -d /        today's messages only (At least one 
  1224.                                    "/" char must be used in a date.  
  1225.                                    The date specified is not rigorously 
  1226.                                    checked; in particular, Z-Mail treats 
  1227.                                    2/30 as a valid date.  
  1228.   
  1229.  -e            use all remaining arguments as the <pattern>
  1230.   
  1231.  -f            match pattern in the "From:" header 
  1232.   
  1233.  -h <header>   match pattern in named header only
  1234.   
  1235.  -i            ignore case of letters when matching
  1236.   
  1237.  -n            do not treat any of the characters in the pattern specially, 
  1238.                except for a leading ^ and a trailing $
  1239.   
  1240.  -p [A-E]      select messages with specified priority
  1241.                Multiple "-p" flags may be used to search 
  1242.                for several priorities at once.
  1243.   
  1244.  -r <msg-list> restrict the range of messages searched to <msg-list>
  1245.   
  1246.  -s            match pattern in the "Subject:" header 
  1247.   
  1248.  -t            match pattern in any header that identifies a recipient 
  1249.                of the message ("To:", "Cc:", etc.)
  1250.   
  1251.  -x            return all the messages which do NOT match
  1252.  
  1253. The command "search" is a synonym for "pick".
  1254.   
  1255. Examples:
  1256.   
  1257.     Find the first 5 messages with the subject
  1258.     "Telephone Message":
  1259.             pick +5 -s Telephone Message
  1260.   
  1261.     Find the first 2 messages of the last 4 that are to
  1262.     "zmail-users":
  1263.             pick -4 +2 -t zmail-users
  1264.   
  1265.     Find those among messages 1 to 10 that are 2 months
  1266.     or more old:
  1267.             pick -r 1-10 -ago -2m
  1268.   
  1269.     Find messages that are 1 week old or newer:
  1270.             pick -ago +1w
  1271.   
  1272.     Find messages that contain "-request" in the
  1273.     Resent-From header:
  1274.             pick -h resent-from -e -request
  1275.   
  1276. A description of the pick operation is printed before the search is
  1277. performed, unless the value of the variable ~#quiet~var#~ contains the field
  1278. "pick", or pick is piped to another Z-Mail command.
  1279. %%
  1280.  
  1281. %expand%
  1282. %%<alias
  1283.  
  1284. %group%
  1285. %%<alias
  1286.  
  1287. %unalias%
  1288. %%<alias
  1289.  
  1290. %alias%
  1291.       alias [name [namelist]]
  1292.       unalias name
  1293.       expand name [name ...]
  1294.  
  1295. ~#Aliases~ui#~ (sometimes called groups) are shorthand names for longer lists
  1296. of addresses to which mail messages are sent.
  1297.  
  1298. Usage:
  1299.  
  1300.  alias                show all aliases
  1301.  alias name           print definition of alias "name"
  1302.  alias name namelist  set alias "name" to namelist
  1303.  unalias name         remove the alias "name"
  1304.  
  1305. A namelist consists of one or more addresses.  An address may be
  1306. another defined alias, a username, a file as a destination, a file
  1307. as a source of other addresses, or a program name as a destination.
  1308. Filenames as destinations must be full pathnames, i.e., they must
  1309. begin with a "/", a "+", or a "~".  Program names must start with a
  1310. pipe symbol and be enclosed in quotation marks:
  1311.  
  1312.     "|program_name"
  1313.  
  1314. Output of program_name is captured by Z-Mail and displayed along
  1315. with any output from the MTA.  You may not place < or > characters in
  1316. the program_name.
  1317.  
  1318. File names as sources of addresses must be enclosed in colons:
  1319.  
  1320.     :filename:
  1321.  
  1322. If the filename is not a full path, it is taken to be relative to
  1323. your home directory.  The file may contain a namelist exactly as
  1324. described above, one or more items per line, including references to
  1325. other files.  The `#' character introduces a comment which continues
  1326. through the end of the line.  A backslash (\) at the end of a line
  1327. causes that line to be continued onto the next.
  1328.  
  1329. The conventions for mail-addressing permit you to place the full name
  1330. or other description of a recipient within parentheses.  For instance,
  1331. the following is a valid namelist:
  1332.  
  1333.  marlin@elfin.com, arb_g@tenstd.org
  1334.  
  1335. The following is the same namelist, but more descriptive:
  1336.  
  1337.  marlin@elfin.com (Aileen Marlin), 
  1338.  arb_g@tenstd.org (Arbalest Group)
  1339.  
  1340. If you use full names in parentheses, then you must separate addresses
  1341. in the namelist with commas.
  1342.  
  1343. The command "expand" prints the addresses associated with the given
  1344. alias names.  "Sub-aliases" appearing within an alias definition will
  1345. also be expanded.
  1346.  
  1347. See also "help addressing" and the variable ~#no_expand~var#~.
  1348. %%
  1349.  
  1350. %msg_list%
  1351.       msg_list [+|-] [msg-list]
  1352.  
  1353. The "msg_list" command is a Z-Script programming aid which accepts a
  1354. message list as an argument and simplifies it.  The argument may
  1355. contain metacharacters ("*", "^", "$", and "."), negation syntax, and
  1356. so on; the resulting list will consist only of numbers and
  1357. number-ranges.  If the argument is syntactically valid, the result is
  1358. stored in the variable ~#output~var#~ and the variable ~#status~var#~ is set to 0.
  1359. If there was a problem parsing the message list, then ~#status~var#~ is set
  1360. to -1 and ~#output~var#~ is empty.
  1361.  
  1362. The special parameters "-" and "+" cause the current message pointer
  1363. to move to the previous or next message, respectively.  If a message
  1364. list was given in addition to "-" or "+", then the current message
  1365. pointer is set to the first or last message, respectively, in the
  1366. message list.
  1367.  
  1368. A summary of message list syntax:
  1369.  
  1370.   *      All messages.
  1371.   ^      The first message.
  1372.   $      The last message.
  1373.   .      The current message.
  1374.   N-M    A range of messages between N and M, inclusive.
  1375.  
  1376. In the last case, N and M may be "*", "^", "$", ".", or numbers
  1377. identifying specific messages.  The range must be in ascending order
  1378. (i.e., you may write "3-7" as a range, but not "7-3").
  1379.  
  1380. To exclude messages from a message list, the syntax is:
  1381.  
  1382.   msg-list-one { msg-list-two }
  1383.  
  1384. That is, a list followed by a second list enclosed in braces.  The
  1385. messages identified by msg-list-two are removed from the set of those
  1386. specified by msg-list-one.  The resulting list refers to those
  1387. messages that are only in msg-list-one and not in msg-list-two.
  1388. %%
  1389.  
  1390. %from%
  1391. %f%
  1392.       from [+|-] [msg-list] [pattern]
  1393.  
  1394. With no parameters, "from" displays the current message's header
  1395. summary.  If given a message list, "from" displays the header
  1396. summaries of the listed messages.  If given a pattern, it displays the
  1397. header summaries of the messages whose "From:" lines contain the
  1398. pattern.  Given both a message list and a pattern, it searches the
  1399. "From:" lines of the listed messages and displays the headers
  1400. summaries of those that match the pattern.
  1401.  
  1402. The special parameters "-" and "+" cause the current message pointer
  1403. to move to the previous or next message, respectively, while also
  1404. displaying that message's header summary.  If a message list was given
  1405. in addition to "-" or "+", then the current message pointer is set to
  1406. the first or last message, respectively, in the message list given.
  1407.  
  1408. Examples:
  1409.  
  1410.         from - 10-30 {16}
  1411. displays the headers of messages 10 through 30 except for message 16
  1412. and set the current message pointer to 10.
  1413.  
  1414.         from +
  1415. displays the header of the message after the current message and
  1416. increment the current message pointer to that message.
  1417.  
  1418.         from + Dan
  1419. displays the headers of all messages that contain "Dan" in the "From:"
  1420. line and set the current message pointer to the last one of that kind
  1421. in the list.
  1422.  
  1423. See also the ~#headers~cmd#~ command and ~#summary_fmt#~.
  1424. %%
  1425.  
  1426. %un_hdr%
  1427. %%<my_hdr
  1428.  
  1429. %my_hdr%
  1430.       my_hdr [header[: body]]
  1431.       un_hdr header
  1432.  
  1433. These commands are used to set, unset or view your personalized
  1434. message headers.  These headers are included in all of your outgoing
  1435. mail.
  1436.  
  1437. Usages of my_hdr:
  1438.  
  1439.   my_hdr               show all headers
  1440.   my_hdr header        show value of header
  1441.   my_hdr header: body  set header with body
  1442.   un_hdr header        remove header
  1443.  
  1444. Note that there is no space between the header name and the colon in
  1445. the third form of the command.
  1446.  
  1447. The string value of a header may be have any of the following special
  1448. forms to create a dynamic (prompted-for) header:
  1449.  
  1450.  []
  1451.   Prompt for a value of the header.  If no (or an empty)
  1452.   response is given, omit the header.
  1453.  
  1454.  [choice1|choice2|choice3|...]
  1455.   Prompt the user (as with the ~#ask~cmd#~ command) with 
  1456.   the listed choices, and set the value of the header to
  1457.   whatever the user selects.  If canceled (or if an
  1458.   empty response is given), omit the header.
  1459.  
  1460.   Note that the choice must be quoted in the ~#my_hdr~cmd#~
  1461.   command to protect the `|' characters from
  1462.   interpretation as a pipe to another command.
  1463.  
  1464.   The "..." above indicates that there may be as many
  1465.   alternatives as desired.  It should not be included
  1466.   literally in a header definition.
  1467.  
  1468.  :selection_function
  1469.   Execute the (user-defined) selection_function.  Before
  1470.   exiting, the selection_function must supply a value for
  1471.   the variable ~#header_value~var#~, which is then used as
  1472.   the value of the header.  If ~#header_value~var#~ is not 
  1473.   set when the selection_function returns, the header is 
  1474.   omitted.
  1475.  
  1476.   The first parameter ($1) to the selection_function is
  1477.   the header name.
  1478.  
  1479.  [choice1|choice2|choice3|...]:selection_function
  1480.   Bring up a simple ~#ask~cmd#~-style dialog with the 
  1481.   listed choices.  After one is selected, invoke the
  1482.   selection_function with the header name as first
  1483.   parameter and the selected value as the second
  1484.   parameter ($2).  The function must still set the
  1485.   ~#header_value~var#~ variable in order for the selection 
  1486.   to be accepted.
  1487.  
  1488.  string (prompt)
  1489.   When "string" is any of the four special forms above,
  1490.   it may be followed by a prompt enclosed in parentheses.
  1491.   This prompt is printed 
  1492.   (or in GUI and Lite modes, displayed in
  1493.   the Compose Headers dialog) when Z-Mail requests the
  1494.   value for the header.  If no prompt is given, the name
  1495.   of the header is used.
  1496.  
  1497.  \string
  1498.   Set the string literally as the header value, even if
  1499.   it begins with a `[' or `:' character.  Do not prompt
  1500.   or execute a function.
  1501.  
  1502.   Note that if a header needs to begin with a backslash
  1503.   character, two backslashes must be used.  Backslashes
  1504.   are not significant elsewhere in the string.
  1505.  
  1506. Z-Mail prompts for headers when initiating a composition.  
  1507. In GUI and Lite mode, the
  1508. Compose Headers dialog can be called up to modify the
  1509. values of the dynamic headers.
  1510. %%
  1511.  
  1512. %uncmd%
  1513. %%<cmd
  1514.  
  1515. %cmd%
  1516.       cmd [name [command]]
  1517.       uncmd name
  1518.  
  1519. This command is used to define command aliases.
  1520. These are similar to aliases in the C-shell.
  1521. The ~#alias~cmd#~ command refers not to command aliases, but to
  1522. mailing groups.
  1523.  
  1524. Usage:
  1525.  
  1526.  cmd              show all command aliases
  1527.  cmd name         show command of alias "name"
  1528.  cmd name command set alias "name" to command
  1529.  uncmd name       remove command alias "name"
  1530.  
  1531. The command must be quoted if it is to contain separators such as ";"
  1532. or "|".
  1533.  
  1534. The arguments of a cmd alias are referenced by using the history
  1535. syntax.  For example:
  1536.  
  1537.  cmd r 'replysender \!* ; delete; next'
  1538.  
  1539. causes "r" to reply using whatever arguments you have given on
  1540. the command line and then delete that message and print the next
  1541. message.
  1542. %%
  1543.  
  1544. %headers%
  1545. %h%
  1546. %H%
  1547.       headers [+|-|N] [[-H]:c]
  1548.  
  1549. Displays the header summaries of certain messages in the current
  1550. folder.  Options are:
  1551.  
  1552.   +     display the next screenful.
  1553.   -     display the previous screenful.
  1554.   N     display a screenful starting at message number N.
  1555.   -H:c  display according to letter "c" where "c" is one of:
  1556.      a  all messages
  1557.      d  deleted messages
  1558.      f  forwarded messages
  1559.      m  marked messages
  1560.      n  new messages
  1561.      o  old messages
  1562.      p  preserved messages
  1563.      r  replied-to messages
  1564.      s  saved messages
  1565.      u  unread messages
  1566.  
  1567. The command "headers +" is equivalent to the "z" command, and "headers
  1568. -" is equivalent to "z-".
  1569.  
  1570. The "headers" command displays a screenful of headers.  
  1571. In command-line mode, deleted messages are not normally shown.  Set the
  1572. variable ~#show_deleted~var#~ to include deleted messages.  In
  1573. GUI, and Lite modes, deleted messages are always shown in the header
  1574. summaries.
  1575.  
  1576. The command ":c" is equivalent to "headers -H:c" where "c" is one of
  1577. the keyletters listed above.  The "-H" can be omitted, i.e., "headers
  1578. :c" also works.  The "headers" command sets the variable ~#output~var#~ to a
  1579. list of the messages selected.
  1580.  
  1581. See the variable ~#summary_fmt~var#~ for further information.
  1582. %%
  1583.  
  1584. %close%
  1585. %shut%
  1586. %%<folder
  1587.  
  1588. %open%
  1589. %%<folder
  1590.  
  1591. %update%
  1592. %%<folder
  1593.  
  1594. %folder%
  1595. %fo%
  1596.       folder [-a] [-f|-F] [-N] [-n] [-r] [-X] [%[user]|#[n]|&|file]
  1597.       folder -d [-n] [-x|-X] [%[user]|#[n]|&|file]
  1598.       folder [-w|-W] [%[user]|#[n]|&|file]
  1599.       folder -l
  1600.  
  1601.       open [-f|-F] [-N] [-n] [-r] [-w] [-X] [%[user]|#[n]|&|file]
  1602.       close [-n] [-x|-X] [%[user]|#[n]|&|file]
  1603.       shut [-n] [-x|-X] [%[user]|#[n]|&|file] 
  1604.       update [-N] [-n] [-r] [-x|-X] [%[user]|#[n]|&|file]
  1605.  
  1606. Open, close, activate, or update folders.  Options:
  1607.  
  1608.   -a       add the named folder to those opened
  1609.   -d       delete the named folder
  1610.   -f       apply the system mailbox (folder) filters
  1611.   -F       do NOT apply the system mailbox filters
  1612.   -l       list the folders that are presently open
  1613.   -N       do not display the list of header summaries
  1614.   -n       do not update any folder that is being closed (implies -X)
  1615.   -r       read-only mode (cannot update changes)
  1616.   -w       watch this folder for new mail at all times
  1617.   -W       do not watch this folder for new mail
  1618.   -x       create an index for the folder on update
  1619.   -X       ignore index on load, do not create on update
  1620.  
  1621. Folder specifiers:
  1622.  
  1623.   %[user]  means system mailbox owned by 'user' (yours by default)
  1624.   #        means the most recently accessed inactive folder
  1625.   #n       means folder number n in the open list
  1626.   &        means the main mailbox (default $mbox)
  1627.   file     the filename of the folder (e.g., '+outgoing')
  1628.  
  1629. The command "open" is equivalent to "folder -a".  The command "close"
  1630. is equivalent to "folder -d".  The command "update" updates the
  1631. specified folder, or the active folder if no folder identifier (name
  1632. or number) is provided.
  1633.  
  1634. The "folder" command changes the active folder; with no arguments, it
  1635. prints the name and status of the active folder.  By default, the
  1636. current folder is updated and closed before the new folder is opened,
  1637. unless the "-a" option is used.  However, folder #0 (zero) is reserved
  1638. for the system mailbox, and once opened, remains open unless
  1639. explicitly closed.
  1640.  
  1641. The characters "+" and "~" are treated specially when they are the
  1642. first character of a file name.  If a filename begins with a tilde
  1643. ("~"), the tilde is expanded to the name of your home directory.  If
  1644. the filename begins with "~user", that is replaced with the pathname
  1645. of the home directory of the named user.  A leading "+" is expanded to
  1646. your folder directory ("~/Mail" or the value of the ~#folder~var#~
  1647. variable).  No "/" is required between "+" and the file name, so both
  1648. "+file" and "+/file" refer to the same file.
  1649.  
  1650. The "open" command recognizes all "folder" options except "-s".  The
  1651. "close" command recognizes the "-n" option to prevent update.  The
  1652. "update" command recognizes the "-r" option, but changes the folder to
  1653. read-only mode AFTER updating it.  To change a folder to read-only
  1654. without updating it, use "folder -r".
  1655.  
  1656. Normally, folders other than the system mailbox are watched for new
  1657. mail only when they are active.  To cause a folder to be watched for
  1658. new mail at all times, open it with "open -w".  You may change the
  1659. watching of a folder after it is open by using "folder -w" to begin
  1660. watching it for new mail, or "folder -W" to stop watching it.  The
  1661. system mailbox is always watched for new mail, even if "folder -W"
  1662. is used.
  1663.  
  1664. A folder index may be manipulated with "-x" (index) and "-X"
  1665. (noindex).  The index is a summary of the folder state, and allows
  1666. Z-Mail to load the folder quickly.  To create an index, use "update
  1667. -x" or "close -x".  Once the index has been created, Z-Mail will keep
  1668. it up-to-date at each folder update.  To turn off indexing of a
  1669. folder, use "update -X".  To load a folder without using its index,
  1670. use "open -X" or "folder -X".  Note that if the index is disabled, it
  1671. must be explicitly reenabled with "update -x".
  1672.  
  1673. Updating a read-only folder will write an index file for that folder
  1674. rather than rewriting the folder itself.  To force this behavior on a
  1675. folder that is not read-only, use "update -n -x".  Whenever the folder
  1676. is loaded (except with "open -X"), the external index file created in
  1677. this way is used to restore the sorting order, saved/deleted/replied
  1678. status, etc. of the messages.
  1679.  
  1680. See also the variables ~#folder~var#~ and ~#mbox~var#~.
  1681.  
  1682. For compatibility with older versions, the single character "!" as an
  1683. argument preceding the folder name is interpreted as "-n".
  1684. %%
  1685.  
  1686. %return%
  1687. %%<exit
  1688.  
  1689. %quit%
  1690. %q%
  1691. %%<exit
  1692.  
  1693. %exit%
  1694. %xit%
  1695. %x%
  1696.       quit   [-f]
  1697.       exit   [status_code]
  1698.       return [status_code]
  1699.  
  1700. The "quit" and "exit" commands end a Z-Mail session when used at the
  1701. command prompt.  The command "quit" updates all open folders.  If new
  1702. mail has come in, you are notified and asked whether to continue the
  1703. program or quit anyway.  If the multivalued variable ~#verify~var#~ is set
  1704. to contain the keyword "quit", then then you are prompted to confirm
  1705. the update of any open folders that have been modified.
  1706.  
  1707. If you specify the -f option to "quit", Z-Mail quits forcibly:  no
  1708. confirmations are requested.  All open folders are updated, and all
  1709. suspended compositions are written to the folder specified in the
  1710. ~#dead~var#~ variable.  Any errors that occur during a "quit -f" are ignored.
  1711.  
  1712. The command "exit" terminates Z-Mail, neither updating the open
  1713. folders nor checking for new mail.
  1714.  
  1715. In scripts and user-defined functions, "exit" causes the script or
  1716. function to stop executing and return to the function that called the
  1717. exiting function.  "return" is a synonym for "exit" in this context.
  1718. If an optional status_code is specified, the vaiable "status" is set
  1719. to status_code.  To cause the entire Z-Mail session to exit from
  1720. within a script or function, use "builtin exit" or simply "x".
  1721. %%
  1722.  
  1723. %ls%
  1724.       ls [options] [directory]
  1725.  
  1726. The "ls" command displays the names of the files in the directory you
  1727. specify.  'ls' is exactly like the UNIX command "ls".  All
  1728. parameters are the same.  The output is normally columnar, and is
  1729. passed through the pager if more than one screenful is generated.
  1730. %%
  1731.  
  1732. %sh%
  1733. %shell%
  1734.       sh [cmd]
  1735.       sh [-t timeout] [-m message] cmd
  1736.  
  1737. (Note that the way sh handles multi-argument cmds changed in Z-Mail
  1738. 2.1)
  1739.  
  1740. sh takes the command cmd and executes it in a Bourne shell (/bin/sh),
  1741. returning the exit status of the shell in the status of the sh
  1742. command.  If no cmd is supplied, then a new interactive shell is
  1743. started.  Either the environment variable SHELL or the Z-Mail
  1744. variable ~#shell~var#~ identifies the shell to invoke in this
  1745. case.  The shell must exit to return to Z-Mail.  In GUI mode, the
  1746. variable ~#window_shell~var#~ is consulted to select a terminal
  1747. emulator in which to run the shell.
  1748.  
  1749. In Lite mode, you may want to use the screencmd prefix to your sh
  1750. statement if the command produces output, or performs
  1751. cursor-addressing functions on the terminal screen.
  1752.  
  1753. If cmd is supplied, it is executed by the operating system under a
  1754. Bourne shell.  If cmd contains pipe symbols ("|") or semicolons, cmd
  1755. should be enclosed in quotation marks.
  1756.  
  1757. Note that if sh executes a cmd that does not terminate and you have
  1758. not specified the -m or -t options, Z-Mail will wait forever for sh to
  1759. return.  Your only recourse is to send Z-Mail a SIGTERM kill signal.
  1760.  
  1761. If cmd consists of more than one argument, sh tries to preserve word
  1762. breaks and quoting when passing cmd to the shell.  If cmd is instead a
  1763. single argument, the shell is allowed to re-parse the string.  The
  1764. following three examples illustrate how sh tries to preserve the number
  1765. of arguments and argument quoting.  Note that in the examples below,
  1766. "sh" means the Z-Script command "sh", not the actual "sh" shell.
  1767.  
  1768. Example 1:
  1769.  
  1770.     sh "cat file | grep word"
  1771.  
  1772.     In this example, sh receives a single argument, removes the
  1773.     surrounding quotes, and passes the rest of cmd to the Bourne shell
  1774.     for interpretation.  The shell sees:
  1775.  
  1776.         cat file | grep word
  1777.  
  1778.     This is the most common use of sh.  The next two examples are
  1779.     intended for advanced users of the Bourne shell and sh.
  1780.  
  1781. Example 2:
  1782.  
  1783.     sh cat file "|" grep word
  1784.  
  1785.     In this example, sh receives five arguments.  As in Example 1, the
  1786.     Z-Mail parser removes the quotes from the pipe symbol.  However,
  1787.     because sh received more than one argument, it applies quoting to
  1788.     each argument before passing the command to the Bourne shell.  The
  1789.     pipe character is quoted along with the rest of the arguments, so
  1790.     the shell sees
  1791.  
  1792.         cat file \| grep word
  1793.  
  1794.     which is probably not what was intended.
  1795.  
  1796. Example 3:
  1797.  
  1798.     sh xterm -title "Editing File" -e vi file
  1799.  
  1800.     In this example, sh receives six arguments (one of which contains a
  1801.     space).  The arguments are parsed by sh, then each argument is
  1802.     quoted before being passed to the Bourne shell, which sees:
  1803.  
  1804.         xterm -title Editing\ File -e vi file
  1805.  
  1806.     The title of the xterm window is therefore correctly set to
  1807.     "Editing File".  If sh had not quoted the arguments, the title
  1808.     would have been broken into two words by the Bourne shell,
  1809.     resulting in a usage-error message from xterm.
  1810.  
  1811. As you can see, the sh command attempts to make the most sensible
  1812. choice in each case.  It is up to you to tell it what you mean, by
  1813. careful use of quoting.
  1814.  
  1815. In GUI and Lite modes, the -m option may be used to specify a message
  1816. that should be displayed in the Task Meter dialog during the execution
  1817. of the command.  If the "Stop" button (GUI) or SPACEBAR (Lite) is
  1818. pressed, then "sh" returns, leaving the "command" running in the
  1819. background.  In this case, the variable "~#child~var#~ is set to the process
  1820. identifier number (pid) of the command.
  1821.  
  1822. The -t option specifies a timeout in seconds that Z-Mail will wait
  1823. before displaying the Task Meter.  If the cmd completes in that time,
  1824. the Task Meter does not appear.  If -t is used without also using -m,
  1825. the message "Running external command" is displayed in the Task Meter
  1826. when it appears.
  1827.  
  1828. NOTE:  When the -m or -t options are used, the cmd to be run must be a
  1829. single command.  Input redirection may be used, but pipelines and
  1830. complex commands containing semicolons, loop constructs, or groupings
  1831. (parentheses or braces) will probably result in a syntax error reported
  1832. from the subshell.
  1833. %%
  1834.  
  1835. %stop%
  1836.       stop
  1837.  
  1838. The stop command sends a stop signal to Z-Mail.  It is equivalent to
  1839. your tty job-control stop character (often ^Z).  On systems that do
  1840. not support job control, "stop" has no effect.  In GUI mode, "stop" is
  1841. identical to "iconify".
  1842.  
  1843. It is never necessary to exit from Z-Mail, because new mail is
  1844. collected and presented whenever it arrives.  Some users may wish to
  1845. replace the command ~#quit~cmd#~ with "update;stop;await" by using the "cmd"
  1846. facility or by creating a user-defined function.  Users of shells with
  1847. job control, such as csh, may then use
  1848.     %zmail
  1849. to bring Z-Mail into the foreground rather than having to start it
  1850. again.
  1851. %%
  1852.  
  1853. %iconify%
  1854.       iconify
  1855.  
  1856. In GUI mode, this command iconifies all open Z-Mail windows.
  1857. %%
  1858.  
  1859.  
  1860. %hide%
  1861. %%<flags
  1862.  
  1863. %unhide%
  1864. %%<flags
  1865.  
  1866. %flags%
  1867. %msg_flags%
  1868.       flags [[+|-] [flag-bits]] [msg-list]
  1869.       hide [msg-list]
  1870.       unhide [msg-list]
  1871.  
  1872. This command sets or displays in detail the status of messages.  If a
  1873. message list is specified, "flags" describes which status flags  of the
  1874. message are set.  If any one or more of the flags are given (see below)
  1875. and no "+" or "-" modifier is specified, then the status of each
  1876. message in the list is set to that status given, replacing any status
  1877. flags on those messages.  However, if a "+" or "-" is specified, then
  1878. the given status flags are added to or removed from the status of the
  1879. message(s), respectively.
  1880.  
  1881. The "hide" and "unhide" commands turn the "hidden" flag on or off,
  1882. respectively.
  1883.  
  1884. Any sensible combination of these flags may be used:
  1885.  
  1886.   D    deleted
  1887.   f    forwarded
  1888.   N    new
  1889.   O    old
  1890.   P    preserved
  1891.   p    printed
  1892.   R    read
  1893.   r    replied-to
  1894.   S    saved
  1895.   U    unread
  1896.   H    hidden
  1897.  
  1898. If no list is given or piped in, then the current message is used.
  1899.  
  1900. See also the ~#mark~cmd#~ command.
  1901. %%
  1902.  
  1903. %setenv%
  1904.       setenv VARIABLE [value]
  1905.  
  1906. The "setenv" command adds a variable to your environment.
  1907. The
  1908. variables in your environment are passed along to any other Unix
  1909. commands run from within Z-Mail.
  1910.  
  1911. Variable names may be any string, but by convention, environment
  1912. variables are usually all upper-case.  If no "value" is specified,
  1913. then the variable name is set to an empty string.  If the value
  1914. contains spaces, you should enclose it in quotation marks.
  1915.  
  1916. Note that the syntax of "setenv" differs from that of ~#set~cmd#~ in that
  1917. there is no equal sign ("=") between the variable name and the value.
  1918. Also, variables assigned with ~#set~cmd#~ do not go into your environment.
  1919. Most Z-Mail variables must be assigned using "set" rather than
  1920. "setenv".
  1921.  
  1922. Use ~#printenv~cmd#~ to display a list of all your environment variables.
  1923. %%
  1924.  
  1925. %unsetenv%
  1926.       unsetenv VARIABLE
  1927.  
  1928. The "unsetenv" command removes a variable from your environment.  You
  1929. must specify exactly one variable to unset.
  1930.  
  1931. Use ~#printenv~cmd#~ to print a list of all your environment variables.
  1932. %%
  1933.  
  1934. %printenv%
  1935.       printenv [VARIABLE]
  1936.  
  1937. Display the entire current environment, or the value of the specified
  1938. environment variable.
  1939.  
  1940. See also ~#setenv~cmd#~ and ~#unsetenv~cmd#~.
  1941. %%
  1942.  
  1943. %edit%
  1944. %e%
  1945. %edit_msg%
  1946.       edit [msg-list]
  1947.  
  1948. The "edit" command lets you edit messages in your folder.  The editor
  1949. used is determined by the variable ~#editor~var#~, the environment variable
  1950. EDITOR, the variable ~#visual~var#~ and the environment variable VISUAL, in
  1951. that order.  If none of those variables is set, the default visual
  1952. editor is used.
  1953.  
  1954. The command "e" is equivalent to "edit".  The command "v" is also
  1955. equivalent, except that the editor used is always the visual editor.
  1956.  
  1957. In GUI mode, "visual" is used first, then "editor".
  1958.  
  1959. When editing messages, be careful not to remove certain message
  1960. headers such as Date:, From:, or any of the other standard headers
  1961. used for mail transport.  If you remove or change something you
  1962. shouldn't have, Z-Mail will not accept your editing changes.  In this
  1963. case, Z-Mail notifies you of the error and the temporary file used to
  1964. edit the message is not removed (allowing you to go back and re-edit
  1965. the message).
  1966. %%
  1967.  
  1968. %unmap%
  1969. %%<map
  1970.  
  1971. %map%
  1972.       map [<sequence> [<expansion>]]
  1973.       unmap <sequence>
  1974.  
  1975. The "map" command allows you to use one keystroke (or a few) to cause
  1976. Z-Mail to respond as though you had typed a longer sequence.  Map can
  1977. be used in line (or "shell") mode.
  1978.  
  1979. Given no arguments, "map" lists all current line mode macros.  Given
  1980. only a <sequence>, it shows the current binding for that sequence.
  1981. Given both a <sequence> and an <expansion>, it creates a macro such
  1982. that, when the <sequence> is typed in line mode, the effect is the
  1983. same as if the <expansion> had been typed instead.
  1984.  
  1985. The same format for control characters that is used for the ~#bind~cmd#~
  1986. command may be used in both the <sequence> and the <expansion>, i.e.,
  1987.     ^X      control-X (where X is any capital letter)
  1988.     \E      the escape character ("^[" also works)
  1989.     \n      a newline (other C-style escapes also work)
  1990.  
  1991. Example:
  1992.     map & print\n
  1993.  
  1994. If you are in line mode and press the & key, then it is as if you
  1995. typed the word "print" and hit carriage return.
  1996.  
  1997. Note that map sequences should use control characters or unusual
  1998. combinations of characters to avoid interfering with normal typing.
  1999. When you wish to type a character and not have it mapped into its
  2000. expansion, precede the character with a backslash (\).
  2001.  
  2002. Mappings are removed with the "unmap" command.
  2003.  
  2004. Also see the ~#map!~cmd#~ command.
  2005. %%
  2006.  
  2007. %unmap!%
  2008. %%<map!
  2009.  
  2010. %map!%
  2011.       map! [<sequence> [<expansion>]]
  2012.       unmap! <sequence>
  2013.  
  2014. The "map!" command allows you to set macros in message-composition
  2015. mode, so that one keystroke (or a or a short sequence) acts as though
  2016. you had typed a longer sequence.  Mappings take effect in line mode,
  2017. but are not used in GUI mode.
  2018.  
  2019. Given no arguments, "map!" lists all composition-mode macros.  Given
  2020. only a <sequence>, it shows the current binding for that sequence.
  2021. Given both a <sequence> and an <expansion>, it creates a macro such
  2022. that, when the <sequence> is typed in message composition mode, the
  2023. effect is the same as if the <expansion> had been typed instead.
  2024.  
  2025. The format for control characters is:
  2026.     ^X      control-X (where X is any capital letter)
  2027.     \E      the escape character ("^[" also works)
  2028.     \n      a newline (other C-style escapes also work)
  2029.  
  2030. Example:
  2031.     map! ! <BANG>
  2032.  
  2033. If you are typing in a message and you press the ! key, Z-Mail
  2034. responds as if you typed the six keys <BANG>.
  2035.  
  2036. To type a character without having the mapping expanded, precede the
  2037. character with a backslash (\).
  2038.  
  2039. Composition-mode mappings are removed with the "unmap!" command.
  2040.  
  2041. Also see the ~#map~cmd#~ command.
  2042. %%
  2043.  
  2044. %eval%
  2045.       eval [-h | -p] args ...
  2046.  
  2047. This command causes its arguments to be read and executed as Z-Mail
  2048. command.  Example:
  2049.  
  2050.     set initprompt='"$hostname%$~#cwd~var#~ "'
  2051.     eval set ~#prompt~var#~=$initprompt
  2052.  
  2053. In this example, the string
  2054.  
  2055.     set ~#prompt~var#~=$initprompt
  2056.  
  2057. is first variable-expanded to yield
  2058.  
  2059.     set ~#prompt~var#~="$hostname%$cwd "
  2060.  
  2061. This expanded string is then evaluated as the Z-Mail command ~#set~cmd#~,
  2062. setting the ~#prompt~var#~ variable to a string containing the hostname, a
  2063. percent sign, the current working directory, and a blank.
  2064.  
  2065. If the "-h" flag is given to eval, then eval looks for formatting
  2066. parameters of the type used in displaying header summaries, and
  2067. replaces them with data taken from the current message.  Example:
  2068.  
  2069.     eval -h ~#pick~cmd#~ -f %f
  2070.  
  2071. Here, the %f is replaced with the "From:" header of the current
  2072. message.  This example finds all messages from the same author as the
  2073. current message.
  2074.  
  2075. If the "-p" flag is given, then eval looks for formatting parameters
  2076. of the type used in displaying the line-mode prompt or GUI mode title
  2077. bar, and replaces those with data from the active folder.
  2078.  
  2079. The "-h" and "-p" flags may not be used together in the same eval.
  2080. %%
  2081.  
  2082. %pipe%
  2083. %Pipe%
  2084. %pipe_msg%
  2085.  pipe [-p pattern] [msg-list] [unix-command] [cmd-args]
  2086.  
  2087. This command is used to send a message as input to a Unix command.
  2088. The standard input of the named command is taken from the message(s)
  2089. specified.  By default, the entire message (including headers) is
  2090. used.  Ignored headers (see "ignore -?" and "retain -?") can be
  2091. suppressed by putting the keyword "pipe" into the multivalued variable
  2092. ~#alwaysignore~var#~.
  2093.  
  2094. The unix-command is executed via "sh" (the Bourne shell), so csh
  2095. aliases may not be used.
  2096.  
  2097. If invoked with a capital letter (Pipe), only the bodies of the
  2098. messages are sent to the unix-command -- all headers are omitted,
  2099. regardless of the value of "alwaysignore".
  2100.  
  2101. If the "-p" argument is given with a pattern, then all the lines in
  2102. the message are skipped until one that begins with the specified
  2103. pattern.  (The pattern must exactly match the beginning of the line in
  2104. the message.  Regular expressions are not used.)  All lines including
  2105. and following the line containing the pattern are sent to the
  2106. unix-command.
  2107.  
  2108. If the pattern is of the form /pattern-one/,/pattern-two/ then after
  2109. pattern-one is matched, the first line to match pattern-two is the
  2110. LAST line sent to the unix-command.
  2111.  
  2112. If the unix-command is omitted, then /bin/sh is used and the 
  2113. pattern searched for is "#!".  This useful shorthand allows you to
  2114. easily extract "shar files."
  2115.  
  2116. Examples:
  2117.  pipe patch     -- send the current message to "patch"
  2118.  pipe -p %! lpr -- send the message to a postscript printer
  2119.  pipe 2 7 more  -- send messages 2 and 7 through "more"
  2120.  1 | Pipe nroff -- send the body of message 1 to "nroff"
  2121. %%
  2122.  
  2123. %merge%
  2124.       merge [-N] folder-name
  2125.  
  2126. The contents of the specified folder are placed in the active folder.
  2127. If "-N" is not specified, a header summary is displayed for each
  2128. message read (see "headers -?").
  2129.  
  2130. Merge always reads messages from the actual folder file.  If the
  2131. folder happens to be open, Z-Mail maintains an internal representation
  2132. of that folder which may differ from the folder file itself (until the
  2133. open folder is "updated").  Thus if XYZ is a folder that is open and
  2134. in which you have deleted some messages, but which has not yet been
  2135. updated, merging from XYZ will not reflect the message deletions.
  2136.  
  2137. A list of all the merged messages is placed in the variable ~#output~var#~.
  2138. %%
  2139.  
  2140. %error%
  2141. %%<echo
  2142.  
  2143. %echo%
  2144.     echo [-n | -d] [-h | -p] args
  2145.     error [-n] [-h | -p] args
  2146.  
  2147. "Echo" displays its arguments.  "Error" is the same as echo except
  2148. that it also sets the variable ~#status~var#~ to -1.  
  2149. In GUI mode, "error"
  2150. pops up a dialog window containing the echoed arguments and waits for
  2151. the user to click "Ok".
  2152.  
  2153. If the "-n" flag is given, then no newline is appended.  If the "-d"
  2154. flag is 
  2155. given and Z-Mail is in GUI mode, 
  2156. the arguments appear in a
  2157. prompt box, which must be dismissed by clicking the "Ok" button.
  2158.  
  2159. If the "-h" flag is given, then echo looks for formatting parameters
  2160. of the type used in displaying header summaries, and replaces them
  2161. with data taken from the current message.
  2162.  
  2163. If the "-p" flag is given, then echo looks for formatting parameters
  2164. of the type used in displaying 
  2165. the line-mode prompt or GUI mode
  2166. title bar, and replaces those with data from the active folder.
  2167.  
  2168. Examples:
  2169.     echo -h This message is from %a and is dated %d
  2170. might produce:
  2171.     This message is from z-code!argv and is dated Dec 14, 1990.
  2172.  
  2173.     echo -p There are %n new messages to read in %F.
  2174. might produce:
  2175.     There are 5 new messages to read in /usr/spool/mail/argv.
  2176.  
  2177. Note that "-h" and "-p" cannot be used simultaneously.
  2178. %%
  2179.  
  2180. %undigest%
  2181.     undigest [-m] [-p pattern] [msg-list] [filename]
  2182.  
  2183. A "digest" is a mail message which is a collection of other mail
  2184. messages mailed to a "moderator" by other users.  The moderator
  2185. compiles all the messages into a folder and sends the result to all
  2186. the subscribers of the mailing list.  The undigest command
  2187. disassembles the entries into the set of messages which comprises the
  2188. digest.
  2189.  
  2190. The "-m" option merges these messages into the current folder.  If
  2191. "-m" is not given and a filename is specified, a new folder is
  2192. created, and the digest is undigestified into that folder.  The user
  2193. may then open the folder to read the messages.
  2194.  
  2195. The "-p" option specifies an alternate pattern to use as the digest
  2196. article separator.  The pattern must match literally at the beginning
  2197. of a line.  The default pattern is "--------" (eight hyphens).
  2198.  
  2199. If a message list is specified, each digest is disassembled to the
  2200. same filename (if given).  If no filename is given and the user did
  2201. not request a merge, then a folder is created based on the "Subject:"
  2202. of the digest.
  2203. %%
  2204.  
  2205. %await%
  2206.     await [-T delay]
  2207.  
  2208. Instructs 
  2209. the shell 
  2210. to wait for new mail to arrive.  New mail is
  2211. checked every 30 seconds by default (15 minutes if ~#use_pop#~ is
  2212. set); a different delay can be specified by using the "-T" option or
  2213. ~#pop_timeout#~.
  2214.  
  2215. If await is used in a pipeline, its output is its input plus the
  2216. list of new messages that have arrived.  For example, to show the
  2217. headers of all new messages and set the current message to the first
  2218. new message:
  2219.  
  2220.     await | from -
  2221.  
  2222. In line mode, the await command terminates only when new mail arrives
  2223. or a keyboard interrupt is generated.  In the other interfaces, await
  2224. returns immediately whether or not there is new mail, except that if
  2225. there is no new mail, Z-Mail "sleeps" for the delay specified by "-T"
  2226. and then checks a second time.
  2227. %%
  2228.  
  2229. %cd%
  2230.       cd [directory]
  2231.  
  2232. Change the current working directory to the specified directory
  2233. , or to
  2234. your home directory if none was given.
  2235.  
  2236. If the variable ~#cdpath~var#~ is set to a list of directory names,
  2237. and the named directory is not an absolute path (i.e., does not begin
  2238. with "/" or "~"), Z-Mail searches the ~#cdpath~var#~ directories in
  2239. the order given for the new directory and changes to the first one
  2240. found.  The current working directory is always checked before any of
  2241. those listed in ~#cdpath~var#~.
  2242. %%
  2243.  
  2244. %chroot%
  2245.       chroot [directory]
  2246.  
  2247. In GUI mode, change the root directory for the ~#File Finder#~ to the specified
  2248. directory.  If no directory is given, report the current root directory
  2249. for the file finder (defaults to "/").  The File Finder will only allow
  2250. the user to access files which have this directory as a prefix.
  2251. %%
  2252.  
  2253. %pwd%
  2254.       pwd
  2255.  
  2256. Displays the current working directory.  The variable ~#cwd~var#~ also holds
  2257. the current working directory unless you have changed it.
  2258. %%
  2259.  
  2260. %undelete%
  2261. %u%
  2262. %%<delete
  2263.  
  2264. %delete%
  2265. %dp%
  2266. %dt%
  2267.       delete [msg-list]
  2268.       undelete [msg-list]
  2269.  
  2270. The "delete" command marks the specified messages as deleted.  If no
  2271. message list is given, the current message is deleted.
  2272.  
  2273. In line mode, deleted messages are not shown in the header summary
  2274. display unless the variable ~#show_deleted~var#~ is set.  In
  2275. GUI mode, deleted 
  2276. messages are shown so they can be selected for
  2277. undelete or other operations.
  2278.  
  2279. Deleted messages are ignored by the ~#pipe~cmd#~ command and by those
  2280. commands that display messages, but most other commands include all
  2281. messages whether deleted or not.
  2282.  
  2283. Deleted messages are lost forever when the folder is updated (by the
  2284. ~#update~cmd#~ command, by changing folders without the "!" flag, or by
  2285. exiting with ~#quit~cmd#~).  Deleted messages can be recovered by the
  2286. "undelete" command at any time BEFORE the folder is updated.
  2287.  
  2288. See also the variable ~#show_deleted~var#~.
  2289. %%
  2290.  
  2291. %history%
  2292.       history [-h] [-r] [number]
  2293.  
  2294. Display the command history that Z-Mail has recorded.  Option "-h"
  2295. suppresses the history numbers, and option "-r" shows the history in
  2296. reverse order (most recent first).  If a number is given, that many
  2297. lines of history are displayed.
  2298.  
  2299. The number of commands that zmail records is controlled by the
  2300. variable ~#history~var#~.  If ~#history~var#~ is not set,
  2301. Z-Mail remembers only the previous command (equivalent to history=1).
  2302.  
  2303. The basic forms of history reference are as follows, where (N is a
  2304. number and str is any string):
  2305.  
  2306.   !str      most recent command beginning with str
  2307.   !?str?    most recent command containing str
  2308.   !N        command N from the history list
  2309.   !-N       the Nth previous command
  2310.   !!        previous command (same as !-1)
  2311.   !$        last word of previous command
  2312.   !*        all arguments of previous command
  2313.  
  2314. Modifiers (H can be str, ?str?, N or -N, n is a number or $):
  2315.  
  2316.   !H:$      last word of referenced command
  2317.   !H:n      nth word of referenced command
  2318.   !H:n-m    nth through mth words of command
  2319.   !H:-n     word 0 (command name) through n of command
  2320.   !H:*      all arguments of command (same as !H:1-$)
  2321.   !H:n-     word n through next-to-last word
  2322.   !H:p      print but don't execute command
  2323.  
  2324.   !{R}str   append str to reference R (R is any form above)
  2325.  
  2326. It is not possible to combine :p with any of the other modifiers.
  2327.  
  2328. See also the variables ~#ignore_bang~var#~ and ~#nonobang~var#~.
  2329. %%
  2330.  
  2331. %folders%
  2332.       folders
  2333.  
  2334. List the files in the directory named by the variable ~#folder~var#~.  These
  2335. files are assumed to be folders of mail messages that can be read in
  2336. by the ~#folder~cmd#~ command (see "folder -?").
  2337.  
  2338. In GUI mode, "folders" brings up the Folder Manager, and is thus a
  2339. shorthand for the command "~#dialog~cmd#~ Folders".
  2340.  
  2341. See also the ~#ls~cmd#~ and ~#folder~cmd#~ commands.
  2342. %%
  2343.  
  2344. %stty%
  2345.       stty [options]
  2346.  
  2347. The "stty" command is equivalent to the UNIX command, "stty".  All
  2348. options are the same.  Some settings are temporarily changed while
  2349. Z-Mail is running, but are restored when Z-Mail exits.  This command
  2350. has no effect in GUI mode.
  2351. %%
  2352.  
  2353. %ask%
  2354.     ask [-noecho] [-input|-file|-list var_name] [-default "text"]
  2355.         [-must_match] "question" [choice1 choice2 ... ]
  2356.  
  2357. The "ask" command asks a question and waits for a reply.  In GUI mode,
  2358. "ask" collects the reply by opening a dialog box.  All command-line
  2359. options to "ask" can be abbreviated to one or more significant letters
  2360. (only the first letter is examined).
  2361.  
  2362. The "-noecho" option keeps "ask" from echoing a user's
  2363. response to a question. Without the "-noecho" option, 
  2364. when you type a response to a question presented by "ask," 
  2365. you can view what you are typing in. With the "-noecho" flag, 
  2366. "ask" doesn't display what you type. 
  2367. This is particularly useful when using ask to prompt for passwords.
  2368.  
  2369. The "-input" option can be used to specify a variable name in which
  2370. the user's typed response will be stored.  In this case, a list of
  2371. choices may also be provided, which are displayed along with the
  2372. question.  The first item in this list is treated as a default choice.
  2373. If the "-must_match" option is present, the user is forced to either
  2374. select one of the choices or to cancel the operation.
  2375.  
  2376. The "-file" option works just like the "-input" option, but the user
  2377. is given a file-finder dialog in GUI mode.
  2378.  
  2379. The "-list" option works just like "-input", but the choices are taken
  2380. as message lists and the user is prompted with a list of message
  2381. summaries associated with each message in the list.  (See example below.)
  2382. Note: in line mode, message summaries aren't given in the prompt; only
  2383. the text of the message list is given as if "-input" were used.
  2384.  
  2385. The type of response varies depending on the nature of the question and the
  2386. choices provided.  If no "-i" option is provided, the question is
  2387. assumed to be a simple "yes/no" question, and Yes or No answers are
  2388. accepted.  The answer given may be determined by the value of the
  2389. variable ~#status~var#~ when the command returns.  The status is 0 (zero) if a
  2390. choice was made or a Yes response was given, 1 (one) if no choice was
  2391. made or a No response was given, and -1 (negative one) if the
  2392. operation was canceled.
  2393.  
  2394. Examples:
  2395.  
  2396.     function newfolder() {
  2397.         ask -f newfolder "Enter a folder name:" +mbox +record
  2398.         if $status != 0
  2399.             return
  2400.         endif
  2401.         folder $newfolder
  2402.     }
  2403.  
  2404. This function asks the user to enter a name, with +mbox and +record as
  2405. being a the initial choices.  If the user answered the question, the
  2406. variable "newfolder" is set to the user's response.  If the user
  2407. canceled the operation without answering the question, the function
  2408. returns (having tested $~#status~var#~).
  2409.  
  2410.     function priority_items() {
  2411.         pick -p A | set A_items
  2412.         ask -l msg "Which message would you like to see?" $A_items
  2413.         if $status == 0
  2414.             display $msg
  2415.         endif
  2416.     }
  2417.  
  2418. This function finds all messages that have a priority level "A" and
  2419. sets them into a variable called A_items.  The ask command then
  2420. puts up a dialog displaying all the message summaries of the A_items.
  2421. The message selected is returned as a message number and set in a new
  2422. variable called "msg".  The message is then shown using the
  2423. ~#display~cmd#~ command.
  2424. %%
  2425.  
  2426. %unfilter%
  2427. %%<filter
  2428.  
  2429. %filter%
  2430.      filter [-n] [filter-name [command [search-options]]]
  2431.      unfilter filter-name
  2432.  
  2433. The "filter" function installs a filter to be invoked either when a
  2434. folder is opened or when new mail arrives in the system folder.  Each
  2435. new filter is added to the list of existing filters, replacing any
  2436. filter that has the same name.
  2437.  
  2438. Filters are executed in alphabetical order by name, regardless of the
  2439. order in which they are created.  This allows sets of filters to be
  2440. defined and new filters to be added in an ordered manner by selecting
  2441. appropriate names.  In most cases, the order in which filters are
  2442. executed is not significant.  However, if any filters use tests of the
  2443. status of messages (saved, deleted, etc.) those filters should be
  2444. named so as to order them after filters that save or delete messages.
  2445.  
  2446. The command to be executed as the filter must be a single argument and
  2447. must be quoted if it contains spaces.  Messages are selected for
  2448. filtering using the same options as the ~#pick~cmd#~ or ~#search~cmd#~
  2449. command.
  2450. Some example filters:
  2451.  
  2452.     filter expire-old-mail delete -ago 3 months
  2453.  
  2454. Deletes mail older than 3 months.
  2455.  
  2456.     filter save-announce "save +announce" -i -s announce
  2457.  
  2458. Saves messages with the word "announce" the in their "Subject:" lines
  2459. into the folder "announce" in the user's folder directory.  The word
  2460. "announce" is matched case-insensitively.
  2461.  
  2462. Some commands cannot be executed as filters.  These include:
  2463.  
  2464.     ~#await~cmd#~    ~#filter~cmd#~   ~#quit~cmd#~     ~#sort~cmd#~   ~#update~cmd#~
  2465.  
  2466. The ~#folder~cmd#~ command can be used to open a new folder during a filter,
  2467. but be sure always to add the new folder without updating the current
  2468. folder.
  2469.  
  2470. If the "-n" option is given, the filter applies only to new mail that
  2471. arrives while Z-Mail is being used interactively.  This should be used
  2472. for filters that perform interactive commands or make announcements.
  2473. For example:
  2474.  
  2475.     filter -n meeting "~#echo~cmd#~ You have a meeting" -i -s meeting
  2476.  
  2477. Other filters may be applied to any folder at the time it is opened by
  2478. using the "-f" option of the ~#folder~cmd#~ command or by using the "-filter"
  2479. option on the Z-Mail command line:
  2480.     folder -f +mbox
  2481.     zmail -filter -folder +mbox
  2482.  
  2483. In all other cases, filters are applied to new messages that arrive in
  2484. the system mailbox while Z-Mail is being used.  This filtering can
  2485. only be suppressed by removing the filters.  The "unfilter" command is
  2486. used to remove one or more filters.  The command "unfilter *" removes
  2487. all filters.
  2488. %%
  2489.  
  2490. %shift%
  2491.       shift [-m | N]
  2492.  
  2493. This command can be used to help parse the arguments of a user-defined
  2494. function.  When a user-defined functions is invoked, the remaining
  2495. words on the command line are placed into parameter variables called
  2496. $1, $2, etc.  $argc contains the number of arguments ("argument
  2497. count").  $argv gives the entire argument list ("argument vector"),
  2498. and $* is a shorthand synonym for $argv.  $1 through $N reference
  2499. individual words.  The variable $0 is the name of the current
  2500. function.
  2501.  
  2502. The "shift" operation removes a single argument from the beginning of
  2503. the list of words.  If a numeric argument is given, that number of
  2504. words is shifted.  The "-m" option of the shift command causes any
  2505. leading message list to be removed from the current argument list.
  2506. This message list can be captured in a named variable by using the
  2507. ~#pipe~cmd#~ syntax, and is otherwise stored temporarily in the variable
  2508. ~#output~var#~.
  2509.  
  2510. For example:
  2511.  
  2512.     function save() {
  2513.         shift -m | set msgs              # save any message list
  2514.         if $argc < 2
  2515.             ask -i filename "Filename: " # prompt for a file
  2516.         else
  2517.             set filename = $1            # use the first argument
  2518.         endif
  2519.         builtin save $msgs $filename
  2520.     }
  2521. %%
  2522.  
  2523. %attach%
  2524.       attach [-rehash] [-load file] [-merge file] [-save file]
  2525.  
  2526.       attach -alias alias_name alias_type
  2527.       attach -path [directory:directory...]
  2528.       attach -type keyword "viewer program" "editor program"
  2529.       attach -code keyword "encoder program" "decoder program"
  2530.       attach -encode type_key code_key
  2531.       attach -default code_key
  2532.  
  2533. This command permits interactive modification of the attachment-type
  2534. information that is specified in the attach.types file in the Z-Mail
  2535. library directory (usually /usr/lib/Zmail).  If no options are
  2536. specified, the current attachment types and codes are displayed.  The
  2537. basic options process attachment-type information files:
  2538.  
  2539.   -rehash       Clear the attachment type information
  2540.                   and re-read the /usr/lib/Zmail/attach.types
  2541.                   file (and files named by the variable
  2542.                   ~#attach_types~var#~).
  2543.   -load         Clear the current attachment type
  2544.                   information and read new attachment
  2545.                   information from the indicated file.
  2546.   -merge        Read information from the indicated
  2547.                   file and add it to the current
  2548.                   attachment type information.
  2549.   -save         Save the current attachment information
  2550.                   to a file.
  2551.  
  2552. The format of these files is the same as /usr/lib/Zmail/attach.types.
  2553.  
  2554. The remaining options directly add to or modify the current attachment
  2555. type information.  Each option corresponds to one of the declarations
  2556. used in an attachment type information file.
  2557.  
  2558.   -alias        Messages labeled as type alias_name
  2559.                   should be treated as type type_key. 
  2560.   -path         Add a list of directories to those
  2561.                   searched for programs used to encode,
  2562.                   decode, edit, and view attachments.
  2563.   -type         Define (or redefine) the viewer and
  2564.                   editor programs associated with a
  2565.                   file type keyword.
  2566.   -code         Define (or redefine) the encoder and
  2567.                   decoder programs associated with an
  2568.                   encoding keyword.
  2569.   -encode       Associate an encoding with a file type.
  2570.   -default      Specify the default encoding to use if
  2571.                   one is required.
  2572.  
  2573. For example, the following command specifies that your own search path
  2574. (in the environment variable $PATH) is used in addition to the default
  2575. path:
  2576.  
  2577.       attach -path $PATH
  2578.  
  2579. Options "-load", "-merge", "-save", and "-rehash" can be specified
  2580. multiple times and are processed in the order given.  Only one "-alias",
  2581. "-code", "-type", "-path", "-encode", or "-default" option can be used in each
  2582. "attach" command.  If options are not given, the current path, types,
  2583. and encodings are listed.
  2584.  
  2585. See also the ~#attach_types~var#~ variable and the ~#detach~cmd#~ command.
  2586. %%
  2587.  
  2588. %detach%
  2589.       detach [<part-identifier>] [<processing>] [msg-number] [file]
  2590.       detach -list
  2591.       detach -temporary
  2592.  
  2593. This command selects one or more attachments from a single message and
  2594. detaches them, placing them into files.  If only a single part is to
  2595. be detached, the optional file argument following the message number
  2596. is used as the output file.  If a file name is the only argument
  2597. given, its name is used to identify the part to detach.
  2598.  
  2599. The <part-identifier> specifies which attachment to detach, and may be
  2600. any of:
  2601.  
  2602.   -part N           Attachment part number N.
  2603.   -name name        The attachment named name.
  2604.   -all              All the attachments of the message.
  2605.  
  2606. If no <part-identifier> is given, and no file name was specified, then
  2607. "-all" is assumed.  In this case, each of the attachments is detached
  2608. to a file having the same name as the attachment name, in the current
  2609. directory.  If "-part" or "-name" is given after "-all", only the part
  2610. specified by the latter argument is detached.  Using "-all" causes
  2611. each attachment to be detached using its own name, so no output file
  2612. name may be specified with "-all".
  2613.  
  2614. The names and part numbers for the attachments are displayed using
  2615. "detach -list".  Also displayed is information about the type of each
  2616. attachment, the way each attachment was encoded for shipping, and a
  2617. short description of each attachment if the sender provided any.  The
  2618. type and encoding information can be used to process the attachments
  2619. using the <processing> options:
  2620.  
  2621.   -code encode_key          Decode as indicated by encode_key.
  2622.   -display                  Display after detaching.
  2623.   -type type_key            Display as indicated by type_key.
  2624.  
  2625. If the attachment is encoded but no "-code" option is given, then
  2626. Z-Mail attempts to discern an encode_key from the attachment.  If
  2627. "-display" is given but "-type" is not, Z-Mail attempts to obtain a
  2628. type_key from the attachment.  It is not necessary to specify both
  2629. "-display" and "-type" except to change the type used for display.
  2630.  
  2631. The "-type" option may not be used with "-all".
  2632.  
  2633. The "-temporary" option tells Z-Mail to delete
  2634. temporary files created when a file is detached.
  2635. Z-mail deletes the files when the folder
  2636. from which they were detached is closed. This option is
  2637. implied when you invoke Z-Mail with the "-display" option.
  2638.  
  2639. For compatibility with version 2.0 of Z-Mail, the options "-encoding"
  2640. and "-use" are synonyms for "-code" and "-type" respectively.
  2641. %%
  2642.  
  2643. %resume%
  2644. %fg%
  2645. %%<jobs
  2646.  
  2647. %jobs%
  2648.       jobs
  2649.       resume [job]
  2650.  
  2651. The "jobs" command displays a list of the suspended compositions.
  2652. Each composition is identified by a number.  The most recently
  2653. suspended composition is also marked with a "+" sign.  This is the
  2654. composition that is resumed by the "resume" command by default.
  2655.  
  2656. Note that if header-editing is in effect, the "jobs" listing may not
  2657. accurately reflect the state of the To: and Subject: lines in the
  2658. editor file.
  2659.  
  2660. The "resume" command resumes a composition suspended by use of the
  2661. "~z" escape.  The optional job argument is an integer from the "jobs"
  2662. list corresponding to the composition to be resumed.  If no job is
  2663. specified, the most recently suspended composition is resumed.  The
  2664. command "fg" is a synonym for "resume".
  2665.  
  2666. These commands are not used in the GUI mode, because each composition
  2667. job has its own input window and never needs to be suspended.
  2668.  
  2669. Note that suspending of compositions is not true job control, in the
  2670. sense used by some shells, because no external process is associated
  2671. with a suspended composition.
  2672. %%
  2673.  
  2674. %functions%
  2675. %%<function
  2676.  
  2677. %unfunction%
  2678. %%<function
  2679.  
  2680. %function%
  2681. %define%
  2682. %undefine%
  2683.       function [-e] [name]
  2684.       functions
  2685.       unfunction name
  2686.  
  2687.       function name() {
  2688.           commands ...
  2689.       }
  2690.  
  2691. The command "function" creates or lists a user-defined function.  With
  2692. no arguments, it lists all functions.  With only a name as an
  2693. argument, it lists the text of the function with that name.  The
  2694. "unfunction" command deletes the named function, or all functions if
  2695. the name is "*".
  2696.  
  2697. The -e option to "function" automatically invokes the default
  2698. editor (specified by ~#wineditor~var#~, ~#editor~var#~,
  2699. or ~#visual~var#~) on the named function.
  2700.  
  2701. The command "functions" lists the names of all current user-defined
  2702. functions without displaying their definitions.
  2703.  
  2704. To define a function, the name must be followed by a set of empty
  2705. parentheses "()" with no spaces between them, and the last argument
  2706. must be an opening brace "{".  Succeeding lines are then read until a
  2707. closing brace "}" is found at the beginning of a line (braces used for
  2708. negation in message lists do not end the definition).  This text is
  2709. stored as the function body.
  2710. %%<-shared-functions
  2711. %%
  2712.  
  2713. %-shared-functions%
  2714. When a user-defined ~#function~cmd#~ is invoked, the remaining words on the
  2715. command line are placed into parameter variables called $1, $2, etc.
  2716. $argc contains the number of arguments ("argument count").  $argv
  2717. gives the entire argument list ("argument vector"), and $* is a
  2718. shorthand synonym for $argv.  $1 through $N reference individual
  2719. words.  The variable $0 is the name of the current function.
  2720.  
  2721. Within a function, the variable ~#input~var#~ is the counterpart of the
  2722. variable ~#output~var#~.  Recall that when a Z-Mail command completes, the
  2723. variable ~#output~var#~ is set to the numbers of the messages affected by
  2724. that command.  When a user-defined function appears on the right side
  2725. of a pipe character (|) in a Z-Mail pipeline, the message numbers that
  2726. are the "output" of the command on the left side of the pipe are
  2727. passed to the user-defined function via "$~#input~var#~".  In addition, when a
  2728. user-defined function is used as a filter (see the ~#filter~cmd#~ command),
  2729. the number of the message being filtered is available as the value of
  2730. "$~#input~var#~".  Since this variable is normally set only if the function is
  2731. used in a pipeline or as a ~#filter~cmd#~, it can be used to test whether a
  2732. pipeline is in progress.  For example:
  2733.  
  2734.     function tellinput() {
  2735.         if $?input
  2736.             echo Messages piped to this function are: $input
  2737.         else
  2738.             echo This function is not in a pipeline.
  2739.         endif
  2740.     }
  2741.  
  2742.     search -i -f bruce | tellinput
  2743.  
  2744. If no messages were piped to the function, ~#input~var#~ will still be set,
  2745. but will have an empty value.
  2746.  
  2747. The ~#output~var#~ of a user-defined function is the same as the
  2748. ~#output~var#~ of the last command that function executes.  To set the
  2749. ~#output~var#~ of a user-defined function to a specific list of
  2750. message numbers, use the ~#msg_list~cmd#~ command.
  2751. %%
  2752.  
  2753. %foreach%
  2754.       foreach variable-name msg-list command
  2755.       foreach variable-name (file-list) command
  2756.  
  2757. The "foreach" command is similar to "eval" in that it causes its
  2758. command argument to be re-parsed and executed.  However, each of the
  2759. message numbers in the specified message list or file names in the
  2760. specified file list is assigned to variable-name, one by one.  For
  2761. each such assignment, the command is re-executed.  Thus, if there are
  2762. five different messages listed, the command executes five times, with
  2763. the variable "variable-name" set to each of the five messages in turn.
  2764.  
  2765. If the arguments following the variable-name are enclosed in
  2766. parentheses, they are treated as file names and metacharacters are
  2767. expanded:
  2768.  
  2769.     ?        Matches any single character
  2770.     *        Matches any number of characters
  2771.     [a-z]    Matches characters in the range a-z
  2772.     {a,b,c}  Matches a, b, or c.
  2773.  
  2774. If the arguments are not in parentheses, "^", "$", "*", ".", "{", and
  2775. "}" are treated as message-list metacharacters as usual.  It is not
  2776. possible to iterate over both file names and message numbers in the
  2777. same "foreach" loop.
  2778.  
  2779. If any of the commands in the loop returns a nonzero exit ~#status~var#~
  2780. (e.g., sets the ~#status~var#~ variable to -1) the entire loop terminates.
  2781. Note, however, that ~#cmd~cmd#~ aliases and functions may in some cases
  2782. include commands that return a nonzero ~#status~var#~ without themselves
  2783. returning nonzero.
  2784. %%
  2785.  
  2786. %each%
  2787.       each msg-list command
  2788.  
  2789. The "each" command is similar to "eval" in that it causes its command
  2790. argument to be re-parsed and executed.  However, each of the messages
  2791. in the specified message list is used as an argument to a separate
  2792. invocation of the command.  Thus, if there are five different messages
  2793. listed, the command executes five times, each time with one of the
  2794. five messages as an argument in turn.  For example:
  2795.  
  2796.   each 1-6 {2,5} 10 ~#reply~cmd#~
  2797.  
  2798. executes:
  2799.  
  2800.   reply 1
  2801.   reply 3
  2802.   reply 4
  2803.   reply 6
  2804.   reply 10
  2805.  
  2806. Use cmd aliases or user-defined functions to allow "each" to invoke
  2807. commands in more complicated ways.  The "\!*" syntax in cmds and the
  2808. "$*" syntax in functions refer to the message number within the "each"
  2809. loop.  For example:
  2810.  
  2811.   cmd rep 'reply \!* -i'
  2812.   each 1-6 {2,5} 10 rep
  2813.  
  2814. executes:
  2815.  
  2816.   reply 1 -i
  2817.   reply 3 -i
  2818.   reply 4 -i
  2819.   reply 6 -i
  2820.   reply 10 -i
  2821.  
  2822. If any of the commands in the loop returns a nonzero exit status
  2823. (e.g., sets the ~#status~var#~ variable to -1) the entire loop terminates.
  2824. Note, however, that cmd aliases and functions may in some cases
  2825. include commands that return a nonzero status without themselves
  2826. returning nonzero.
  2827. %%
  2828.  
  2829. %-%
  2830. %variables%
  2831. Variables are modified by the ~#set~cmd#~ and ~#unset~cmd#~ commands.
  2832. %%<set
  2833. %%
  2834.  
  2835. %unbutton%
  2836. %%<button
  2837.  
  2838. %button%
  2839. %Button%
  2840.  
  2841.    button [location] [options] [button-name] [command]
  2842.    unbutton button-name
  2843.  
  2844. In GUI and Lite modes, the "button" command creates a user-defined 
  2845. button in the button panel of the Main, Compose, or Message window.
  2846. You may create action buttons, which execute a Z-Script command
  2847. or function when pressed, or toggle buttons, which alter the
  2848. state of Z-Mail variables or options.
  2849.  
  2850. If you specify no arguments, this command displays all the
  2851. buttons for the current context, which by default is the Main
  2852. window.  (Contexts are discussed below.)
  2853.  
  2854. location may be specified as either the name of a window
  2855. or the name of a button list:
  2856.  
  2857.      -window main
  2858.      -window message
  2859.      -window compose
  2860.      -buttonlist MainActions
  2861.      -buttonlist MessageActions
  2862.      -buttonlist ComposeActions 
  2863.  
  2864. The -window option may be abbreviated as -w; the -buttonlist
  2865. option may be abbreviated as -b.
  2866.  
  2867. Groups of buttons that appear together in a window are
  2868. specified in button lists.  The default button lists for the
  2869. main, message and compose windows are shown above, you 
  2870. may also specify a user-defined button list.
  2871.  
  2872. Location may also be specified as a context:
  2873.  
  2874.      -window-context windowname
  2875.      -buttonlist-context buttonlistname
  2876.  
  2877. These options may be abbreviated as -W and -B
  2878. respectively.
  2879.  
  2880. when these options are used in place of -window or
  2881. -buttonlist, the specified location is used for all
  2882. button commands that follow, until a different location
  2883. is specified.
  2884.  
  2885.  
  2886. options may be any of the following:
  2887.  
  2888.  
  2889.  -no-msgs    if messages do not need to be selected
  2890.              in order for this button to execute.  This
  2891.              option may be abbreviated as -n, and only
  2892.              applies to buttons in the main window
  2893.              (or in the MainActions button list).
  2894.  
  2895.  -position # specifies the position of the button;
  2896.              buttons are numbered left to right starting
  2897.              from 1
  2898.  
  2899.  -final      to indicate that this button should always 
  2900.              have the highest position number
  2901.  
  2902.  -sensitivity expression
  2903.  
  2904.              if the specified Boolean expression 
  2905.              evaluates to false, the button is insensitive
  2906.              (i.e., grayed out).  If the expression 
  2907.              evaluates to true, the button is sensitive.
  2908.  
  2909.  -focus-condition expression
  2910.              if the specified Boolean expression changes
  2911.              from false to true, the button gains focus.
  2912.              (Focus refers to the selection rectangle that
  2913.              appears around an interface object indicating
  2914.              that Motif keyboard shortcuts will act upon
  2915.              it.  You can change focus using the TAB key.)
  2916.  
  2917.  -value expression
  2918.              if this option is supplied, the button is a
  2919.              toggle button, rather than an action button.
  2920.              When the expression evaluates to false, the
  2921.              button is toggled off; when it evaluates to
  2922.              true, the button is toggled on.
  2923.  
  2924. Focus and sensitivity expressions may take the 
  2925. following forms:
  2926.  
  2927.  expression ::= expr1 && expr2  (expr1 and expr2)
  2928.                 expr1 || expr2  (expr1 or expr2)
  2929.                 (expr)          (parentheses may be used
  2930.                                  for grouping)
  2931.                 !expr           (expr is not true)
  2932.                 expr1 == expr2  (expr1 equals expr2)
  2933.                 expr1 != expr2  (expr1 does not equal expr2)
  2934.                 $variable
  2935.                 text-string
  2936.                 number          (expressions may also include
  2937.                                  Z-Mail variables, strings,      
  2938.                                  and numbers.)
  2939.  
  2940. Value expressions are restricted to one of the following forms:
  2941.  
  2942.  expression ::= A
  2943.                 !A
  2944.  A ::= $variable         (returns contents of variable)
  2945.        $?variable        (returns true if variable is set)
  2946.        $variable:(value) (returns value if variable is set
  2947.                           to value; returns null otherwise)
  2948.        $?variable:(value)(returns true only if variable is
  2949.                           set to value; returns false
  2950.                           otherwise.)
  2951.  
  2952. button-name specifies the text that appears on the button.  Specifying
  2953. this argument will set both the name and label of the button to the
  2954. same string. The "label" is the text that appears on the button;
  2955. the "name" refers to the internal name of the widget.
  2956.  
  2957. To specify a name and label that aren't identical, 
  2958. use these options instead of the button-name argument:
  2959.  
  2960.      -name button-name
  2961.      -label button-label
  2962.  
  2963. If you use only -name option, the specified text will also
  2964. appear as the button label.  You must specify -name in order
  2965. to use -label.
  2966.  
  2967. command specifies the name of the Z-Script command or function
  2968. that gets executed when the button is pressed.  If the -value
  2969. option has been specified, command is optional.  If both -value
  2970. and command are specified, command is executed after the value
  2971. is toggled.
  2972.  
  2973. The "unbutton" command is used to remove buttons from the window.
  2974. "Unbutton *" causes all buttons to be removed.
  2975. %%
  2976.  
  2977. %menu%
  2978.  
  2979.         menu [location] [options] [menu-name] [command]
  2980.         unmenu menu-name
  2981.  
  2982. The menu command is used to create and list user-defined menus
  2983. and menu items in the GUI and Lite interfaces.  Each menu item
  2984. created is associated with a Z-Script command that gets executed
  2985. when the menu item is chosen.
  2986.  
  2987. You may modify the contents of the menu bar in the Main, 
  2988. Message and Compose windows as well as the pop-up menus in
  2989. the following locations:
  2990.         
  2991.  - the message summaries area of the main window
  2992.  - the output area of the main window
  2993.  - the command area of the main window
  2994.  - the body area of the message window
  2995.  
  2996. location is specified with one of the following options:
  2997.         
  2998.  -menulist menulistname
  2999.  -menulist-context menulistname
  3000.  
  3001. menulist name may be the name of any default menu list or any
  3002. user-defined menu list.  Default menu list names for menu bars
  3003. and pop-up menus are shown below:
  3004.  
  3005.  main window menu bar    MainMenu
  3006.  message window menu bar MessageMenu
  3007.  compose window menu bar ComposeMenu
  3008.  summaries pop-up menu   MainSummariesPopupMenu
  3009.  output area pop-up      OutputStatictextPopupMenu
  3010.  command area pop-up     CommandlineAfPopupMenu
  3011.  message body pop-up     ReadMessageBodyPopupMenu
  3012.  
  3013. There are also menu list names for each menu on a menu
  3014. bar, as well as submenus (or "pullright" menus).  Menu list
  3015. names for these menus take the form:
  3016.  
  3017.         WindownameMenunameMenu
  3018.  
  3019. For example, the menu list name for the Folder menu in the
  3020. main window is MainFolderMenu.
  3021.  
  3022. When the -menulist-context option is used, the specified
  3023. location is used for all menu commands that follow, until
  3024. a different location is specified.
  3025.  
  3026. options may be any of the following:
  3027.  
  3028.  
  3029.  -no-msgs    if messages do not need to be selected
  3030.              in order for this item to execute.  This
  3031.              option may be abbreviated as -n, and only
  3032.              applies to menu items in the main window
  3033.              (menu bar menus, the summaries pop-up menu, 
  3034.              the command area pop-up menu, and the output
  3035.              area pop-up).
  3036.  
  3037.  -position # specifies the position of the item
  3038.              items are numbered top to bottom starting
  3039.              from 1, left to right for menu bars.
  3040.  
  3041.  -final      to indicate that this item should always have
  3042.              the highest position number
  3043.  
  3044.  -separator  to indicate that this item is a separator line
  3045.  
  3046.  -sensitivity expression
  3047.              if the specified Boolean expression evaluates 
  3048.              to false, the item is insensitive 
  3049.              (i.e., grayed out).  If the expression 
  3050.              evaluates to true, the item is sensitive
  3051.  
  3052.  -focus-condition expression
  3053.              if the specified Boolean expression changes
  3054.              from false to true, the item gains focus.
  3055.              (Focus refers to the selection rectangle that
  3056.              appears around an interface object indicating
  3057.              that Motif keyboard shortcuts will act upon
  3058.              it.  You can change focus using the TAB key.)
  3059.  
  3060.  -value expression
  3061.              if this option is supplied, the item is a
  3062.              toggle item, rather than an action item.
  3063.              When the expression evaluates to false, the
  3064.              item is toggled off; when it evaluates to
  3065.              true, the item is toggled on.
  3066.  
  3067. Focus and sensitivity expressions may take the 
  3068. following forms:
  3069.  
  3070.  expression ::= expr1 && expr2  (expr1 and expr2)
  3071.                 expr1 || expr2  (expr1 or expr2)
  3072.                 (expr)          (parentheses may be used
  3073.                                  for grouping)
  3074.                 !expr           (expr is not true)
  3075.                 expr1 == expr2  (expr1 equals expr2)
  3076.                 expr1 != expr2  (expr1 does not equal expr2)
  3077.                 $variable
  3078.                 text-string
  3079.                 number          (expressions may also include
  3080.                                  Z-Mail variables, strings,      
  3081.                                  and numbers.)
  3082.  
  3083. Value expressions are restricted to one of the following forms:
  3084.  
  3085.  
  3086.  expression ::= A
  3087.                 !A
  3088.  A ::= $variable         (returns contents of variable)
  3089.        $?variable        (returns true if variable is set)
  3090.        $variable:(value) (returns value if variable is set
  3091.                           to value; returns null otherwise)
  3092.        $?variable:(value)(returns true only if variable is
  3093.                           set to value; returns false
  3094.                           otherwise.)
  3095.  
  3096. menu-name specifies the text that appears on the menu or
  3097. item. Specifying this argument will set both the name and label of the
  3098. menu or item to the same string. The "label" is the text that appears
  3099. on the menu or item; the "name" refers to the internal name of the widget.
  3100.  
  3101. To specify a name and label that aren't identical, 
  3102. use these options instead of the button-name argument:
  3103.  
  3104.  -name menu-name
  3105.  -label menu-label
  3106.  
  3107. If you use only -name option, the specified text will also
  3108. appear as the menu label.  You must specify -name in order
  3109. to use -label.
  3110.  
  3111. command specifies the name of the Z-Script command or function
  3112. that gets executed when the item is chosen.  If the -value
  3113. option has been specified, command is optional.  If both -value
  3114. and command are specified, command is executed after the value
  3115. is toggled.  command is also optional when the -separator
  3116. option is specified.
  3117.  
  3118. The "unmenu" command is used to remove menus or menu items.
  3119. %%
  3120.  
  3121. %unmenu%
  3122. %%<menu
  3123.  
  3124. %dialog%
  3125.       dialog [-iconic] [-close] [-I icon-name] [-i] dialog-name
  3126.  
  3127. Note that the -iconic option is not available in Z-Mail Lite.
  3128.  
  3129. This command is used in GUI mode to cause a specified dialog to be
  3130. opened.  The possible dialog-names are:
  3131.  
  3132.  Aliases     Envelope    Templates
  3133.  Browser     Headers     Toolbox*     
  3134.  Save        Compose*    Printer 
  3135.  Help        Search      Variables
  3136.  Dates       Fonts*      Menus*
  3137.  Colors*     Filters*    Buttons* 
  3138.  Functions*  Compoptions Addfolder
  3139.  Newfolder   Helpindex   Renamefolder
  3140.  Multikey(+)
  3141.  
  3142. Items marked with (*) are not available in Z-Mail Lite; items
  3143. marked with (+) are available only in Z-Mail Lite.
  3144.  
  3145. This command is most useful in a user-defined function that has been
  3146. attached to a button.
  3147.  
  3148. Any number of dialogs may be specified and they will all pop up.
  3149.  
  3150. If the "-iconic" option is used, the dialog closed to its iconic state.
  3151. If "-I <file>" is used, then <file> must contain an X11 bitmap which will
  3152. be used as that dialog's window icon.
  3153.  
  3154. If the "-close" option is used, the dialog is totally closed (not even
  3155. in its iconic state).  This usually implies destruction of the dialog,
  3156. whereas "-iconic" merely hides its visibility.
  3157.  
  3158. If no dialog name is given, the action is taken on the window from
  3159. where the command was given.
  3160. %%<Buttons
  3161. %%
  3162.  
  3163. %version%
  3164.       version
  3165.  
  3166. Print the version and copyright information for Z-Mail.
  3167. %%
  3168.  
  3169. %rename%
  3170.       rename [oldfolder] newname
  3171.  
  3172. This command renames oldfolder (or the current folder if oldfolder is
  3173. not given) to newname.  Only opened, writable folders may be renamed.
  3174. If a file having the new name already exists, rename requests that the
  3175. name change be confirmed.  The old folder is updated into the new
  3176. folder, making deletions and other changes permanent, and the old
  3177. folder is then removed from the file system.
  3178. %%
  3179.  
  3180. %redraw%
  3181.       redraw [-all] [msg-list]
  3182.  
  3183. This command causes all windows to "refresh" in GUI and Lite modes.
  3184. If the active folder has changed, the windows will change to reflect
  3185. the new folder.  If a message list is specified or piped in, those
  3186. messages are selected in the ~#Main window#~.  The "-all" option forces
  3187. all message summaries in the ~#Main window#~ to be redraw, but does not
  3188. affect which messages are selected.
  3189. %%
  3190.  
  3191. %uniconify%
  3192.       uniconify
  3193.  
  3194. Available only in GUI mode, this command reverses the effects of the
  3195. ~#iconify~cmd#~ command.  If Z-Mail is not iconified, the command has no
  3196. effect.
  3197. %%
  3198.  
  3199. %remove%
  3200. %rmfolder%
  3201.       remove [-i] [-I] [-f] file1 [file2 ...]
  3202.       rmfolder [-x] [-i] [-f] folder
  3203.  
  3204. Remove listed files.  If a file is an open folder, then the folder is
  3205. updated and closed unless the -f option (see below) is used.  The -i
  3206. option interactively prompts to confirm removal.  If the
  3207. ~#verify~var#~ variable includes "remove" as one of its values, the -i
  3208. option is implicitly set for every rm and rmfolder command.
  3209.  
  3210. The "-I" option prompts you only if you are trying to remove a file
  3211. not identifiable as a mail folder.  "rmfolder" implies the "-I" flag.
  3212.  
  3213. The "-x" option to "rmfolder" causes any external index file associated
  3214. with the named folder to be removed.  The folder is not affected.
  3215.  
  3216. The "-f" option prevents any interactive prompting to confirm removal.
  3217. %%
  3218.  
  3219. %trap%
  3220.       trap [[command] signal [signal ...]]
  3221.  
  3222. When "trap" is executed, the specified "command" is installed as a
  3223. handler for the indicated signals.  If a trapped signal is received
  3224. by Z-Mail, "command" is executed.  Signals must be listed by number,
  3225. not by name; the number for each signal depends on your operating
  3226. system.
  3227.  
  3228. If no command is given, the traps for the listed signals are removed.
  3229.  
  3230. If 0 is specified as the signal, the command is executed when Z-Mail
  3231. is about to exit.
  3232.  
  3233. If neither a command nor a signal is given, "trap" lists the current
  3234. signal traps.
  3235.  
  3236. NOTE:  The following signals cannot be trapped:
  3237.  
  3238.     ILL (4)     KILL (9)    BUS (10)    SEGV (11)
  3239.     PIPE (13)   ALRM (14)   STOP (17)   CHLD (20)
  3240.     CONT (19)   TTIN (21)   TTOU (22)   VTALRM (23)
  3241.  
  3242.     TSTP (BSD) or CLD (SVR3)  (both number 18)
  3243.  
  3244. Some of these signals may not be present on all operating systems.
  3245. If a signal listed above is not present on your system, then its
  3246. number is not reserved.
  3247. %%
  3248.  
  3249. %builtin%
  3250.       builtin command [arguments]
  3251.  
  3252. The "builtin" keyword is not a command, but rather a command
  3253. modifier.  It instructs Z-Mail to use a predefined, internal ("built
  3254. in") version of a command.  User-defined functions and ~#cmd~cmd#~
  3255. abbreviations are thus bypassed, even if their name is the same as
  3256. that of a Z-Mail command.  If the "command" following "builtin" is not
  3257. a built-in Z-Mail command, Z-Mail will respond with "Command not
  3258. found."
  3259.  
  3260. Examples:
  3261.  
  3262.     builtin ~#delete~cmd#~ 7
  3263.     builtin ~#read~cmd#~ 5
  3264.     builtin ~#set~cmd#~ ~#realname~var#~ = "This is My Name"
  3265. %%
  3266.  
  3267. %if%
  3268. %else%
  3269. %endif%
  3270. This is not a true command; rather, it is a control structure.
  3271. The if...else...endif conditional may be used only in user-defined
  3272. functions and scripts.  The syntax is:
  3273.  
  3274.     if condition
  3275.         commands
  3276.     else
  3277.         commands
  3278.     endif
  3279.  
  3280. The "else" part may be omitted.  The "condition" may have any of
  3281. these forms:
  3282.  
  3283.       x      x == y      x < y      x <= y      x =~ y
  3284.       !x     x != y      x > y      x >= y      x !~ y
  3285.  
  3286. Comparisons with =~ and !~ expect a filename pattern on the right hand
  3287. side, which is matched against a string on the left hand side.
  3288.  
  3289. A few file test operations are also supported as the "condition":
  3290.  
  3291.       -e file        - file exists
  3292.       -F file        - file is a folder containing messages
  3293.       -z file        - file is empty (zero size)
  3294.  
  3295. File test operations may be negated by preceding them with an `!':
  3296.  
  3297.       ! -e file      - file does not exist
  3298.       ! -F file      - file is not a folder
  3299.       ! -z file      - file is not empty
  3300.  
  3301. In file test operations, the usual abbreviations (%, &, ~, +) may be
  3302. used.  However, folder numbers (#0, #1, #2, ...) are NOT converted to
  3303. the names of those folders.
  3304. %%
  3305.  
  3306. %debug%
  3307.       debug [0]
  3308.  
  3309. This command toggles a debugging trace.  This is useful for debugging
  3310. Z-Script functions and Z-Mail initialization files.
  3311.  
  3312. Given no argument, debug toggles the trace on if it is off, or toggles
  3313. it off if it is on.  Given the argument 0, debug always turns the trace
  3314. off.
  3315. %%
  3316.  
  3317. %-%
  3318. %task_meter%
  3319.       task_meter [-on|-off|-check|-wait] [message]
  3320.  
  3321. This command can be used to display a notice when a Z-Script function
  3322. is performing a time-consuming task.
  3323.  
  3324. Options:
  3325.     -on      Turns task meter on (pops up the dialog)
  3326.     -off     Turns task meter off (pops down the dialog)
  3327.     -check   Sets $status to 1 if the Stop button was pressed
  3328.     -wait    Waits until the Stop button is pressed
  3329. %%
  3330.  
  3331. %screencmd%
  3332.       screencmd [-p] any-statement
  3333.  
  3334. (Lite mode only)
  3335. When screencmd precedes a statement, Z-Mail Lite relinquishes control
  3336. of the terminal screen for the duration of the statement.  This allows
  3337. commands that perform cursor addressing (such as vi and emacs) to
  3338. work properly.
  3339.  
  3340. The -p option to screencmd causes Z-Mail Lite to print the prompt
  3341.  
  3342.       Press ENTER to resume Z-Mail Lite: 
  3343.  
  3344. and wait until a ENTER is pressed before retaking control of the screen.
  3345. This prevents Z-Mail Lite from erasing the output of a statement
  3346. before you've read it.
  3347. %%
  3348.  
  3349. %uninterpose%
  3350. %%<interpose
  3351.  
  3352. %interpose%
  3353.       interpose -before command interposing_function
  3354.       interpose -after command interposing_function
  3355.       interpose -operation keyword interposing_function
  3356.  
  3357.       uninterpose -before command interposing_function
  3358.       uninterpose -after command interposing_function
  3359.       uninterpose -operation keyword interposing_function
  3360.  
  3361. This command allows a user-defined function to be "interposed" or
  3362. "piggybacked" on a built in command or operation.  This means that whenever
  3363. Z-Mail executes the command or performs the operation, the interposed
  3364. function is also called.  Functions (called "interposers") can be
  3365. interposed either before or after commands, but only before (not
  3366. after) operations.
  3367.  
  3368. The specified interposing function must be an existing user-defined 
  3369. function; you cannot specify Z-Script directly in the "interpose"
  3370. command line.
  3371.  
  3372. The "uninterpose" command removes an interposer.  If the string "*"
  3373. appears in place of an interposing_function, all interposers of the
  3374. indicated command or operation are removed.  Note that to completely
  3375. remove interposers of a command it is necessary to do both:
  3376.  
  3377.     uninterpose -before command *
  3378.     uninterpose -after command *
  3379.  
  3380. Operation interposers are called whenever the operation occurs, no
  3381. matter what the reason.  Command interposers are called only when the
  3382. named command (or one of its synonyms) executes.  The following
  3383. operations may be interposed upon:
  3384.  
  3385.     display    -- a message is displayed to the user
  3386.     delete     -- a message is marked for deletion
  3387.     undelete   -- the deletion mark is removed from a message
  3388.     save       -- a message is saved (written, copied) to a file
  3389.  
  3390.     mail       -- a composition is initiated
  3391.     attach     -- a file is attached to a composition
  3392.     send       -- a completed composition is sent
  3393.  
  3394. This list obviously does not include all possible Z-Mail operations.
  3395. In most cases, an operation can be caught by interposing on the
  3396. corresponding Z-Script command.  The operations listed constitute those
  3397. that:
  3398.  
  3399.     may occur automatically (e.g. the "autoprint" variable causes the
  3400.       "delete" command to display a message);
  3401.     are not a direct consequence of a Z-Script command (e.g., the
  3402.       "attach" operation may, or may not, occur during a composition);
  3403.     are common to several Z-Script commands that are not synonymous
  3404.       (e.g., "mail" is common to the commands "mail" and "reply").
  3405.  
  3406. For example, consider the command "dp" (short for "delete and print").
  3407. This executes neither the "delete" nor the "display" commands, but
  3408. triggers both the "delete" and the "display" operations.
  3409.  
  3410. Other examples:
  3411.  
  3412.     Execute the "display" command when the "show_deleted" variable is
  3413.     not set.  The "display" command asks whether to undelete before
  3414.     displaying.  Interposers for the "display" command are called.
  3415.     Interposers for the "undelete" and "display" operations may also
  3416.     be called, but the interposers for the "undelete" command are not.
  3417.  
  3418.     Execute the "write" command.  Interposers for the "write" command
  3419.     and for the "save" operation are called, but interposers for the
  3420.     "save" command are not.
  3421.  
  3422. When interposed before a command, the user-defined function receives
  3423. exactly the same arguments (and piped-in message list, via
  3424. $~#input~var#~) as the command itself.  The interposer can determine
  3425. which command caused it to be called by examining the value of
  3426. positional parameter $0.  Some commands have synonyms; for example,
  3427. the commands "~#read~cmd#~", "~#print~cmd#~", and "~#display~cmd#~"
  3428. all call the same interposers, regardless of which name is used to
  3429. install the interposer.
  3430.  
  3431. When interposed after a command, the interposer is passed the command
  3432. name as $0.  If the command affected one or more messages, that list of
  3433. messages forms the other parameters to the interposer.
  3434.  
  3435. When interposed on an operation, the interposer is passed the keyword
  3436. describing that operation as $0.  If the operation affects one or more
  3437. messages, those message numbers appear next.  If the operation affects
  3438. a file, the name of that file follows the message numbers.
  3439.  
  3440. Interposers on operations currently are passed no other parameters.
  3441.  
  3442. Each interposed function automatically disables itself during its
  3443. execution, so it is safe for the function to make another call to the
  3444. command or operation on which it is interposed.  Note, however, that
  3445. certain combinations are ignored; for example, invoking "compcmd send"
  3446. from a "send" interposer has no effect, because the same message can
  3447. be sent only once.
  3448.  
  3449. When called from within an interposing function, the special command
  3450. "thwart" prevents all remaining interposers and the command itself
  3451. from being executed.  If the function is an after-command interposer,
  3452. "thwart" substitutes its argument for the return value of the command,
  3453. but does not otherwise affect execution of the command.  Like
  3454. "return", "thwart" immediately exits the calling function and sets the
  3455. variable ~#status~var#~ to its integer argument.  If the function is
  3456. interposed on an operation, this status is sometimes lost (replaced by
  3457. the status of the command performing the operation).
  3458.  
  3459. Notes:
  3460.  
  3461. It is much more useful to interpose on the operation "send" than after
  3462. the command "~#mail~cmd#~".  The composition may still be in progress when the
  3463. "~#mail~cmd#~" command returns.
  3464.  
  3465. The "~#attach~cmd#~" command is used to define attachment types, not to attach
  3466. files to messages.  Interposing on the attach operation (NOT command)
  3467. is almost always what is intended.
  3468.  
  3469. The "~#flags~cmd#~" command can be used to change message status directly,
  3470. bypassing the interposers for operations such as "~#delete~cmd#~".
  3471.  
  3472. WARNINGS:
  3473.  
  3474. Changing folders within an interposer is not prohibited, but can have
  3475. unpredictable side-effects for message operations if the interposer
  3476. does not also call "thwart".
  3477.  
  3478. Certain "~#compcmd~cmd#~" operations automatically "thwart" when called from an
  3479. interposer on the "send" operation.  These include "edit-message" and
  3480. "edit-visual".
  3481.  
  3482. Use at your own risk.
  3483.  
  3484. Examples:
  3485.  
  3486. The following checks an X-Acknowledge header on any message that is
  3487. displayed and asks the user to confirm reading the message.
  3488.  
  3489.     function confirm_read() {
  3490.         #
  3491.         # Get the value of the X-Acknowledge header
  3492.         set acks = "$[%?X-Acknowledge?]"
  3493.         # Check whether it includes "read", using lower case
  3494.         # The X makes sure "if" never receives an empty arg
  3495.         if "X$acks:l" =~ *read*
  3496.             # Check to see if message has already been read
  3497.             # by checking the content of the Status: header, which
  3498.             # will contain an 'R' if so.
  3499.             set stat = "$[%?Status?]"
  3500.             if "X$stat" =~ *R*
  3501.                 # Uncomment the following line if you're testing
  3502.                 # the implementation of read receipt and want to
  3503.                 # verify you get here
  3504.                 #echo -d "Already read!"
  3505.                 return -1
  3506.             endif
  3507.             # Ask whether to acknowledge, not to, or cancel
  3508.             ask "Acknowledge that you've read this message?"
  3509.             if $status == 0
  3510.                 # If acknowledged, send the reply
  3511.                 reply -send -file $home/.acknowledged
  3512.             else
  3513.                 if $status < 0
  3514.                     # If canceled, don't continue display
  3515.                     thwart
  3516.                 endif
  3517.             endif
  3518.         endif
  3519.     }
  3520.     interpose -operation display confirm_read
  3521.     my_hdr X-Acknowledge: "[read|no]"
  3522.  
  3523. The following prevents any further interposers from being assigned or
  3524. removed.
  3525.  
  3526.     function nope() {
  3527.         # Prevent the interpose command
  3528.         if $0 =~ *interpose
  3529.             thwart
  3530.         endif
  3531.         # Prevent "unfunction nope" in any form
  3532.         if " $* " =~ "* nope *"
  3533.             thwart
  3534.         endif
  3535.     }
  3536.     interpose -before interpose nope
  3537.     interpose -before uninterpose nope
  3538.     interpose -before unfunction nope
  3539. %%
  3540.  
  3541. %compcmd%
  3542.   compcmd [job] cmd[:off] [arguments]
  3543.  
  3544. Perform a command on a composition.  The "job" argument specifies the
  3545. composition to be affected:
  3546.   
  3547.     compcmd %3 append-line "Sincerely yours,"
  3548.   
  3549. If the job is omitted, the current composition is affected.  See the
  3550. "~#jobs~cmd#~" command for more information.  When an interposer
  3551. (defined with the "~#interpose~cmd#~" command) on "~#attach~cmd#~" or
  3552. "~#send~cmd#~" is called, the composition that called the interposer is
  3553. the current composition.  
  3554.   
  3555. The "compcmd" facility currently supports the following "cmd"
  3556. directives:
  3557.   
  3558.  append-line line_to_append  Append the indicated 
  3559.                              text and a newline to the 
  3560.                              message body.
  3561.   
  3562.  append-text text_to_append  Append the indicated text to 
  3563.                              the message body.
  3564.   
  3565.  attach-file filename type   Attach a file of specified 
  3566.                              type.
  3567.   
  3568.  blind-carbon recipient_name [ ... ]
  3569.                              Add BCC recipients.
  3570.   
  3571.  cancel                      Cancel the message.
  3572.   
  3573.  carbon-copy recipient_name [ ... ]
  3574.                              Add CC recipients.
  3575.   
  3576.  directory-check             Pass all addresses through the 
  3577.                              address browser.
  3578.   
  3579.  edit-message                Call up the "$~#wineditor#~" 
  3580.                              or "$~#editor~var#~" external 
  3581.                              editor.
  3582.   
  3583.  edit-visual                 Call up the "$~#visual~var#~" 
  3584.                              external editor.
  3585.   
  3586.  erase                       Erase the contents of the 
  3587.                              message.
  3588.   
  3589.  forward-unindented [message_number]
  3590.                              Forward the current (or 
  3591.                              specified) message from the 
  3592.                              active folder to the message 
  3593.                              body.
  3594.   
  3595.  get-header header_name      Place the current value of the 
  3596.                              indicated header in the 
  3597.                              variable "header_value".
  3598.   
  3599.  include-message [message_number]
  3600.                              Include (indented) the current
  3601.                              (or specified) message into the 
  3602.                              composition.
  3603.  
  3604.  insert-file filename        Append a file to the message 
  3605.                              body.
  3606.  
  3607.  insert-header header_name: header_value
  3608.                              Add any header.  You must 
  3609.                              include a colon after the 
  3610.                              header_name and a space 
  3611.                              before header_value.
  3612.  
  3613.  kill                        Cancel the message (prompt for 
  3614.                              confirmation).
  3615.  
  3616.  log [logfilename]           Activate outgoing header log.  
  3617.                              If you specify a file name, it 
  3618.                              is used only if the $~#logfile~var#~ 
  3619.                              variable is not set.
  3620.   
  3621.  pipe shell_command          Pass the message body through 
  3622.                              the specified shell command.
  3623.   
  3624.  preview attachment_number   Preview an attachment.
  3625.   
  3626.  record [recordfilename]     Activate the outgoing message 
  3627.                              record. If you specify a file 
  3628.                              name, it is used only if 
  3629.                              $~#record~var#~ is not set.
  3630.   
  3631.  return-receipt-to           Request return-receipt.
  3632.   
  3633.  save-draft filename         Save composition to filename. 
  3634.                              The entire message, including 
  3635.                              headers, is saved. If filename
  3636.                              exists, the draft is appended
  3637.                              to it.
  3638.   
  3639.  save-to-file filename       Append the message body to 
  3640.                              a file.
  3641.   
  3642.  send-message                Send the message.
  3643.   
  3644.  sort-addresses              Pass each address header 
  3645.                              through the sort routine.
  3646.   
  3647.  subject subject_text        Set the subject of the 
  3648.                              message.
  3649.   
  3650.  to recipient_name [...]     Add TO recipients.
  3651.   
  3652.  use-signature               Activate ~#autosign~var#~.
  3653.   
  3654.  write-to-file [filename]    Write (destructively) the 
  3655.                              message to a file.
  3656.   
  3657. Any operation that enables a feature (e.g. use-signature) or adds a
  3658. header also has a corresponding "off" variant.
  3659.  
  3660. The get-header directive returns the header value in the header_value
  3661. variable, which is the same variable used by the dynamic header
  3662. mechanism (see ~#my_hdr~cmd#~) to assign the value of a header.  This makes it
  3663. easy for a dynamic-header function to leave the value of the header
  3664. unchanged.
  3665. %%
  3666.  
  3667. %license%
  3668.     license operation [argument] [operation [argument] ...]
  3669.  
  3670. This command manipulates licensing for the current Z-Mail session.
  3671.  
  3672. Operations:
  3673.   -get       Obtains a license from the current server.
  3674.   -info      Briefly describes current licensing status.
  3675.   -key       Use the argument key for licensing this session.
  3676.   -release   Releases license back to the current server.
  3677.   -server    Set ZCNLSERV to the argument host:port.
  3678.  
  3679. The leading hyphen may be omitted from any of these operations.  More than
  3680. one operation (with arguments as appropriate) may appear.  Operations are
  3681. executed in the order listed.  This command sets the ~#status~var#~ variable
  3682. according to the success or failure of the last operation performed.
  3683.  
  3684. The "get" operation does nothing when a license is already held, even if
  3685. the server has been changed.  To force a change of servers, use "release"
  3686. followed by "get".  Note that a "get" is automatically performed whenever
  3687. an attempt is made to open a folder or to save a message into a folder.
  3688.  
  3689. The "key" operation licenses the current session only, and the argument
  3690. activation key string must be a time-limited, user-unlimited, local-
  3691. only (non-NLS), demonstration key, as available from Z-Code.
  3692.  
  3693. Operation synonyms (single-letter abbreviations listed first):
  3694.   get        g, obtain
  3695.   info       i
  3696.   key        k, activate, licensekey (demos only)
  3697.   release    r, give, giveup
  3698.   server     Z, licenseserver, netserver, zcnlserv
  3699.  
  3700. Examples:
  3701.  
  3702.   license -release                       Release the current license.
  3703.   license -server nlshost:2722 -get      Get a license from nlshost.
  3704.   license -activate b8c12f5f4ff15e9d     Use b8c12f5f4ff15e9d as a key.
  3705. %%
  3706.  
  3707. %enable%
  3708. %%<disable
  3709.  
  3710. %disable%
  3711.     disable commandname1 [commandname2 ...]
  3712.     enable commandname1 [commandname2 ...]
  3713.  
  3714. These commands restrict or grant access to other Z-Script commands.
  3715. These commands normally may be used only in the system.zmailrc
  3716. file, by your Z-Mail installer/maintainer.
  3717.  
  3718. Examples:
  3719.  
  3720.   disable sh            # Restrict the "~#sh~ui#~" interpreter
  3721.   disable license       # Restrict the "~#license~ui#~" command
  3722.  
  3723. A disabled command still operates normally when it is used in the
  3724. system.zmailrc file.  Once system.zmailrc has been read, however, any
  3725. further attempt to execute a disabled command is refused.
  3726.  
  3727. The "enable" and "disable" commands are themselves disabled when
  3728. Z-Mail starts up.  To permit these commands to be used outside the
  3729. system.zmailrc file, the "enable" command must be applied.
  3730.  
  3731. Example:
  3732.  
  3733.   enable disable        # Grant access to "disable"
  3734.   enable enable         # Grant access to "enable"
  3735.  
  3736. Note that disabled commands are completely restricted, even if they
  3737. appear in Z-Script functions defined before the command became
  3738. disabled.  Choose with care those commands that are to be disabled.   
  3739. %%
  3740.  
  3741. %textedit%
  3742.         textedit set-item areaname
  3743.         textedit action [arguments ...]
  3744.  
  3745. The textedit command is used to manipulate text in text areas
  3746. without using the mouse.  It is designed for use primarily
  3747. in Z-Script functions. 
  3748.   
  3749. When you use textedit, you must first specify the text area
  3750. you wish to work with, using the first form of the command
  3751. shown above.  areaname must be one of the following:
  3752.   
  3753.   command-field         command area
  3754.   output-text           output area
  3755.   message-body          body area of the message window
  3756.   compose-body          body area of the compose window
  3757.   to-header-field       To field of the compose window
  3758.   subject-header-field  Subject field of the compose window
  3759.   cc-header-field       Cc field of the compose window
  3760.   bcc-header-field      Bcc field of the compose window
  3761.   variable-description  description field in the Variables dialog
  3762.   helpindex-text        description field in the Help dialog
  3763.   alias-name-field      Alias Name field in the Aliases dialog
  3764.   alias-address-field   Address(es) field in the Aliases dialog
  3765.   header-name-field     Header Name field in the Envelope dialog
  3766.   print-command-field   Print Command field in the Print dialog
  3767.   main-messages-field   Messages field in the main window
  3768.   compose-messages-field
  3769.                         Messages field in the compose window 
  3770.   message-messages-field        
  3771.                         Messages field in the message window
  3772.   datesearch-messages-field
  3773.                         Messages field in the Date Search dialog
  3774.   patternsearch-messages-field
  3775.                         Messages field in the Pattern Search dialog
  3776.   
  3777. You may then use subsequent textedit commands to act upon the
  3778. specified area:
  3779.   
  3780.         textedit action [arguments ...]
  3781.   
  3782. action may be one of the following:
  3783.   
  3784.   text-indent [string]  prefixes each line of selected text with        
  3785.                         the specified string, or the value of
  3786.                         the indent_str variable
  3787.   text-unindent         removes a prefix from selected text
  3788.   text-fill             formats selected text so that it spans
  3789.                         the width of the text area
  3790.   text-pipe command     pipes selected text through specified UNIX
  3791.                         shell command
  3792.   text-delete-all       delete all text in area
  3793.  
  3794.   text-get-cursor-position variable
  3795.                         assigns the current cursor location 
  3796.                         (number of characters from the top of
  3797.                         the text area) to the specified variable
  3798.                         
  3799.   text-get-selection-position variable1 variable2
  3800.                         assigns the location of the beginning of
  3801.                         the selection to variable1 and the location
  3802.                         of the end of the selection to variable2
  3803.   text-set-selection-position value1 value2
  3804.                         selects the text between value1 and value2.
  3805.                         If value1 and value2 are equal, or if value2
  3806.                         is omitted, the cursor is placed at value1
  3807.                         and no text is selected.
  3808.   text-get-selection variable [...]
  3809.                         assigns the selected text to the specified
  3810.                         variable(s).
  3811.   text-get-text variable
  3812.                         assigns all text in the area to the specified
  3813.                         variable.
  3814.   text-set-cursor-position value
  3815.                         places the cursor at the position specified
  3816.                         by 'value'.  Value should be specified as
  3817.                         number of characters from the top of the file.
  3818.   text-save-to-file filename
  3819.                         saves all the text in the area to the specified
  3820.                         file
  3821.   text-insert text      inserts specified text into the text area,
  3822.                         at the insertion point
  3823.   text-scroll-up        scroll text up one line
  3824.   text-scroll-down      scroll text down one line
  3825.   text-paste            paste contents of clipboard
  3826.   text-set-selection-position start-point end-point
  3827.                         xtselect text between specified start-point
  3828.                         and end-point.  (start-point and end-point
  3829.                         are specifed by the number of characters
  3830.                         each is from the top of the text area)
  3831.   text-end              move insertion point to end of text
  3832.   text-backward-char    move insertion point backward one character
  3833.   text-forward-char     move insertion point forward one character
  3834.   text-delete-backward-char
  3835.                         delete character to left of insertion point
  3836.   text-delete-forward-char
  3837.                         delete character to right of insertion point
  3838.   text-beginning-of-line
  3839.                         move insertion point to beginning of line
  3840.   text-end-of-line      move insertion point to end of line
  3841.   text-next-page        scroll text down one page
  3842.   text-previous-page    scroll text up one page
  3843.   text-delete-to-end-of-line
  3844.                         delete text between insertion point and
  3845.                         end of line
  3846.   text-delete-to-beginning-of-line
  3847.                         delete text between insertion point and
  3848.                         beginning of line
  3849.   text-beginning        move insertion point to top of text area
  3850.   text-backward-word    move insertion point backward one word
  3851.   text-forward-word     move insertion point forward one word
  3852.   text-delete-backward-word
  3853.                         delete the word to the left of the 
  3854.                         insertion point
  3855.   text-delete-forward-word
  3856.                         delete the word to the right of the 
  3857.                         insertion point
  3858.   text-open-line
  3859.                         insert a carriage return at the 
  3860.                         insertion point
  3861.   text-deselect         unselect text
  3862.   text-cut-selection    cut selected text
  3863.   text-copy-selection   copy selected text
  3864.   text-clear-selection  delete selected text
  3865.   text-select-all       select all text in the area
  3866.   inputfield-accept     act like RETURN in text-entry "inputfields"
  3867.   get-cursor-position   get current cursor position
  3868.   next-line             move cursor to next line
  3869.   previous-line         move cursor to previous line
  3870.   forward-word          move cursor forward a word
  3871.   start-selecting       begin selection at cursor position
  3872.   stop-selecting        stop selecting text at cursor position
  3873.   resume-selecting      continue selection at cursor position
  3874.   paste                 paste cut or copied text at cursor
  3875.   beginning             move cursor to start of text
  3876.   end                   move cursor to end of text
  3877.   backward-char         move cursor back one character
  3878.   forward-char          move cursor forward one character
  3879.   delete-backward-char  delete character to left of cursor
  3880.   delete-forward-char   delete character cursor is on
  3881.   beginning-of-line     move cursor to start of line
  3882.   end-of-line           move cursor to end of line
  3883.   delete-to-end-of-line delete from cursor to end of line
  3884.   delete-to-beginning-of-line
  3885.                         delete from cursor to start of line
  3886.   backward-word         move cursor back one word
  3887.   delete-backward-word  delete word to left of cursor
  3888.   delete-forward-word   delete word cursor is on
  3889.   open-line             insert new line above cursor
  3890.  
  3891.   indent textstring     replace selection with specified 
  3892.                         textstring, prefacing each line
  3893.                         with the string specified by the
  3894.                         indent_str variable
  3895.   unindent textstring   replace selection with specified
  3896.                         textstring
  3897.   fill                  reformats selected text so it uses
  3898.                         all the space between the left and
  3899.                         right sides of the text area
  3900.   pipe command          pipe selected text through command
  3901.  
  3902. Note that the cursor position and the selection may be
  3903. separate from one another.  Moving the cursor, inserting
  3904. or deleting text does not necessarily move, clear, or 
  3905. replace the current selection.
  3906. %%
  3907.  
  3908. %arith%
  3909.         arith variable = expression
  3910.  
  3911. arith evaluates a mathematical expression and assigns the
  3912. result to the specified variable.
  3913. %%<-shared-math
  3914.  
  3915. %calc%
  3916.         calc expression
  3917.  
  3918. calc evaluates a mathematical expression and outputs the
  3919. result.
  3920.  
  3921. %%<-shared-math
  3922.  
  3923. %-shared-math
  3924. The syntax and precedence of operators are identical to
  3925. the C language, except that ** (for powers) and ! (for 
  3926. factorials) have been added; refer to any C reference 
  3927. book for additional information.
  3928.  
  3929.   Operator      Meaning
  3930.   --------      -------
  3931.  
  3932.      **         raise to the power of
  3933.      *          multiply
  3934.      /          divide
  3935.      %          assign remainder
  3936.      +          add
  3937.      -          subtract
  3938.      <<         left shift
  3939.      >>         right shift
  3940.      <=         less than or equal to
  3941.      >=         greater than or equal to
  3942.      <          less than
  3943.      >          greater than
  3944.      !=         not equal
  3945.      ==         equal
  3946.      &&         logical AND
  3947.      ||         logical OR
  3948.      &          bitwise AND
  3949.      |          bitwise OR
  3950.      ,          sequential evaluation
  3951.      !          factorial
  3952. %%
  3953.  
  3954. %-%
  3955. %License Agreement%
  3956. %sla%
  3957. %SLA%
  3958. %%<zmlib>License.txt
  3959.  
  3960. # Local Variables:
  3961. # mode: text
  3962. # fill-column: 70
  3963. # paragraph-start: "^[   \n %]"
  3964. # paragraph-separate: "^\\([      %]*\\|%%.*\\|%.*%\\)$"
  3965. # End:
  3966.